diff options
author | Jason Pleau <jason@jpleau.ca> | 2014-12-07 14:30:15 -0500 |
---|---|---|
committer | Jason Pleau <jason@jpleau.ca> | 2014-12-07 14:35:32 -0500 |
commit | 1d5e665a8b315269a4606aba0d9a630289de7ec2 (patch) | |
tree | ab05531ac632115627dd7f0309e531acbcef6d94 /CMakeLists.txt | |
parent | 64c1b9e6d403470ee0c2f6740b7204f7bce8f1af (diff) |
add CMAKE_INSTALL_LIBDIR
Keeps the default to 'lib', while allowing to use it like so:
-DCMAKE_INSTALL_LIBDIR=lib/x86_64-linux-gnu
Diffstat (limited to 'CMakeLists.txt')
-rwxr-xr-x | CMakeLists.txt | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 13c26cc..77a94a7 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,6 +44,12 @@ endif() # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Weverything -Wno-c++98-compat -Wno-shadow -Wno-padded -Wno-missing-noreturn -Wno-global-constructors") # endif() +# Library installation directory +if(NOT DEFINED CMAKE_INSTALL_LIBDIR) + set(CMAKE_INSTALL_LIBDIR lib) +endif(NOT DEFINED CMAKE_INSTALL_LIBDIR) +set(libdir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) + # C++11 feature checks include(CheckCXX11Features.cmake) @@ -161,7 +167,7 @@ if (NOT WINDOWS OR CYGWIN) install( FILES ${CMAKE_CURRENT_BINARY_DIR}/entityx.pc - DESTINATION "lib/pkgconfig" + DESTINATION "${libdir}/pkgconfig" ) endif() @@ -173,6 +179,6 @@ install( install( TARGETS ${install_libs} - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib + LIBRARY DESTINATION "${libdir}" + ARCHIVE DESTINATION "${libdir}" ) |