aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorCarlos Gonçalves <mail@cgoncalves.info>2009-08-21 18:53:00 +0100
committerHugo Lima <hugo.lima@openbossa.org>2009-08-21 15:10:04 -0300
commit72a8d046e16268669e18940c3ebf22ecae6ef581 (patch)
treedee58d67416f2729e12adeb24f1d5e48a40d2069 /CMakeLists.txt
parent8f9ed5bd51827d96bda708121008b24bb3d55801 (diff)
Allow defining the 'lib' dir (eg. 'lib64').
This is required by some distributions such as openSUSE, where 64-bit libraries are installed in lib64 directories and 32-bit libraries in the lib directories.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 5 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8de46e16e..e453cfe38 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -58,6 +58,9 @@ parser/rpp/pp-main.cpp
parser/rpp/preprocessor.cpp
)
+set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" )
+set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib${LIB_SUFFIX})" FORCE)
+
qt4_add_resources(apiextractor_RCCS_SRC generator.qrc)
set(apiextractor_MOC_HEADERS
@@ -121,8 +124,8 @@ install(FILES ${root_HEADERS} DESTINATION include/apiextractor)
# FILES_MATCHING PATTERN "*.h"
# PATTERN ".svn" EXCLUDE
# )
-install(TARGETS apiextractor LIBRARY DESTINATION lib)
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/apiextractor.pc DESTINATION lib/pkgconfig)
+install(TARGETS apiextractor LIBRARY DESTINATION ${LIB_INSTALL_DIR})
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/apiextractor.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FindApiExtractor.cmake
DESTINATION share/cmake-2.6/Modules)