aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlec Thomas <alec@swapoff.org>2014-12-08 09:53:10 +1100
committerAlec Thomas <alec@swapoff.org>2014-12-08 09:53:10 +1100
commit3aad0575bf8e98034ff758bdf8f7d6d69f90d83d (patch)
treeab05531ac632115627dd7f0309e531acbcef6d94
parent64c1b9e6d403470ee0c2f6740b7204f7bce8f1af (diff)
parent1d5e665a8b315269a4606aba0d9a630289de7ec2 (diff)
Merge pull request #70 from jpleau/libdir
add CMAKE_INSTALL_LIBDIR
-rwxr-xr-xCMakeLists.txt12
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}"
)