From dbfbb78dbd74ac6cb74fc1551de589f1855bb4cb Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Sun, 5 Apr 2009 21:10:33 +0200 Subject: Fix install libdir for 64bit platform. --- CMakeLists.txt | 6 +++++- libplist.pc.in | 4 ++-- src/CMakeLists.txt | 4 ++-- swig/CMakeLists.txt | 4 ++-- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ecccfc6..09ae8e8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,10 @@ SET( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_SOURCE_DIR}/cmake/modul 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) + FIND_PACKAGE( LibXml2 REQUIRED ) FIND_PACKAGE( GLIB2 REQUIRED ) FIND_PACKAGE( SWIG ) @@ -36,7 +40,7 @@ ADD_CUSTOM_TARGET(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/c ########## PkgConfig ############################ CONFIGURE_FILE( "libplist.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libplist.pc" ) ########## INSTALL ############################## -INSTALL( FILES "${CMAKE_CURRENT_BINARY_DIR}/libplist.pc" DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig/ ) +INSTALL( FILES "${CMAKE_CURRENT_BINARY_DIR}/libplist.pc" DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig/ ) ########## CPack ################################ INCLUDE( libplistPackaging ) diff --git a/libplist.pc.in b/libplist.pc.in index c59db5a..0e56127 100644 --- a/libplist.pc.in +++ b/libplist.pc.in @@ -1,12 +1,12 @@ prefix=${CMAKE_INSTALL_PREFIX} exec_prefix=${CMAKE_INSTALL_PREFIX} -libdir=${CMAKE_INSTALL_PREFIX}/lib +libdir=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR} includedir=${CMAKE_INSTALL_PREFIX}/include Name: libplist Description: A library to handle Apple Property Lists whereas they are binary or XML Version: ${LIBPLIST_VERSION} Requires: libxml-2.0 >= 2.6.30 glib-2.0 >= 2.14.1 -Libs: -L${CMAKE_INSTALL_PREFIX}/lib -lplist +Libs: -L${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR} -lplist Cflags: -I${CMAKE_INSTALL_PREFIX}/include diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4c0f843..ab3f694 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -14,5 +14,5 @@ SET_TARGET_PROPERTIES( plist PROPERTIES SOVERSION ${LIBPLIST_SOVERSION} ) INSTALL(TARGETS plist RUNTIME DESTINATION bin COMPONENT lib - LIBRARY DESTINATION lib COMPONENT dev - ARCHIVE DESTINATION lib COMPONENT dev) + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT dev + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT dev) diff --git a/swig/CMakeLists.txt b/swig/CMakeLists.txt index 5867b20..030333f 100644 --- a/swig/CMakeLists.txt +++ b/swig/CMakeLists.txt @@ -8,9 +8,9 @@ SWIG_ADD_MODULE( PList python plist.i ) SWIG_LINK_LIBRARIES( PList plist ${PYTHON_LIBRARIES} ) INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/_PList${CMAKE_SHARED_MODULE_SUFFIX} - DESTINATION lib/python${PYTHON_VERSION}/site-packages/libplist/ ) + DESTINATION ${CMAKE_INSTALL_LIBDIR}/python${PYTHON_VERSION}/site-packages/libplist/ ) INSTALL( FILES ${CMAKE_CURRENT_SOURCE_DIR}/__init__.py - DESTINATION lib/python${PYTHON_VERSION}/site-packages/libplist/ ) + DESTINATION ${CMAKE_INSTALL_LIBDIR}/python${PYTHON_VERSION}/site-packages/libplist/ ) INSTALL( FILES ${CMAKE_CURRENT_SOURCE_DIR}/plist.i DESTINATION include/plist/swig COMPONENT dev) -- cgit v1.1-32-gdbae