summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar Hector Martin2009-10-28 00:14:21 +0100
committerGravatar Hector Martin2009-10-28 00:14:21 +0100
commite4f4f9e4c47fe40e0f89d3b8c5c6151833fc54a7 (patch)
treea1ce4b8069bfe286eb41e416500d3af9ec08c8f7 /CMakeLists.txt
parent0d117bd6975f2c5e11726b6302863ff3f3b61d16 (diff)
downloadusbmuxd-e4f4f9e4c47fe40e0f89d3b8c5c6151833fc54a7.tar.gz
usbmuxd-e4f4f9e4c47fe40e0f89d3b8c5c6151833fc54a7.tar.bz2
Use lib64 on 64-bit systems
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 8 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4251bde..a5e8f1c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,9 +6,13 @@ SET ( LIBUSBMUXD_SOVERSION "1" )
cmake_minimum_required(VERSION 2.6)
-IF(NOT DEFINED CMAKE_INSTALL_LIBDIR)
- SET(CMAKE_INSTALL_LIBDIR lib CACHE PATH "Output directory for libraries")
-ENDIF(NOT DEFINED CMAKE_INSTALL_LIBDIR)
+IF(NOT DEFINED LIB_SUFFIX)
+ IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ SET(LIB_SUFFIX "64" CACHE STRING "Define suffix of library directory name (32/64)" )
+ ELSE(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ SET(LIB_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" )
+ ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ENDIF(NOT DEFINED LIB_SUFFIX)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/Modules/")
@@ -20,7 +24,7 @@ add_subdirectory (udev)
# pkg-config
CONFIGURE_FILE ("${CMAKE_SOURCE_DIR}/libusbmuxd.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libusbmuxd.pc")
# install pkg-config file
-INSTALL (FILES "${CMAKE_CURRENT_BINARY_DIR}/libusbmuxd.pc" DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig/)
+INSTALL (FILES "${CMAKE_CURRENT_BINARY_DIR}/libusbmuxd.pc" DESTINATION lib${LIB_SUFFIX}/pkgconfig/)
# add uninstall target
CONFIGURE_FILE( "${CMAKE_SOURCE_DIR}/Modules/cmake_uninstall.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY)