diff options
author | Christian Mollekopf <mollekopf@kolabsys.com> | 2012-03-27 01:36:39 (GMT) |
---|---|---|
committer | Christian Mollekopf <mollekopf@kolabsys.com> | 2012-03-27 01:36:39 (GMT) |
commit | 80aec98f365f12b40be06748cd63ca0443a8a212 (patch) | |
tree | 572fed75355df7a79e005dbaef825fb95eb9ad1f /cmake | |
parent | d6ab94d181ac99af12708954f177441e2287d111 (diff) | |
download | libkolabxml-80aec98f365f12b40be06748cd63ca0443a8a212.tar.gz |
Revert "Fix typo"
This reverts commit 61fbb2d4d532b1c59749b5f17b456228a7134ef8.
Conflicts:
kolab-libs.spec.in
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/FindKolabInternal.cmake | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/cmake/modules/FindKolabInternal.cmake b/cmake/modules/FindKolabInternal.cmake new file mode 100644 index 0000000..fb9d6a5 --- /dev/null +++ b/cmake/modules/FindKolabInternal.cmake @@ -0,0 +1,51 @@ + +# The install directory is defined by the CMAKE_INSTALL_PREFIX which defaults to /usr/local if not specified. +# To install i.e. to /usr use "cmake -DCMAKE_INSTALL_PREFIX=/usr ." +# +# The library directory suffix (64/32) is detected automatically based on the available directories in CMAKE_INSTALL_PREFIX +# The Result of this can be overridden by setting KOLAB_LIB_INSTALL_DIR "cmake -DKOLAB_LIB_INSTALL_DIR=/usr/lib64/ ." +# +# The runtime install is controlled by KOLAB_BIN_INSTALL_DIR +# The header install is controlled by KOLAB_HEADER_INSTALL_DIR +# +# KOLAB_INSTALL_DIRECTORIES contains the determined install directories and should be used with install commands + +get_property(LIB64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS) + +if (${LIB64} STREQUAL "TRUE") + find_path(LIB32FOUND "${CMAKE_INSTALL_PREFIX}/lib32") + find_path(LIB64FOUND "${CMAKE_INSTALL_PREFIX}/lib64") + if (LIB64FOUND) + set(LIBSUFFIX 64) + else() + set(LIBSUFFIX "") + endif() +else() + set(LIBSUFFIX "") +endif() + +if(KOLAB_LIB_INSTALL_DIR) + message("KOLAB_LIB_INSTALL_DIR specified manually") +else() + set(KOLAB_LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIBSUFFIX}") +endif() +message("KOLAB_LIB_INSTALL_DIR: ${KOLAB_LIB_INSTALL_DIR}") + +if(KOLAB_BIN_INSTALL_DIR) + message("KOLAB_BIN_INSTALL_DIR specified manually") +else() + set(KOLAB_BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin") +endif() +message("KOLAB_BIN_INSTALL_DIR: ${KOLAB_BIN_INSTALL_DIR}") + +set(KOLAB_INSTALL_DIRECTORIES RUNTIME DESTINATION "${KOLAB_BIN_INSTALL_DIR}" + LIBRARY DESTINATION "${KOLAB_LIB_INSTALL_DIR}" + ARCHIVE DESTINATION "${KOLAB_LIB_INSTALL_DIR}" COMPONENT Devel ) + + +if(KOLAB_HEADER_INSTALL_DIR) + message("KOLAB_HEADER_INSTALL_DIR specified manually") +else() + set(KOLAB_HEADER_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include/kolab") +endif() +message("KOLAB_HEADER_INSTALL_DIR: ${KOLAB_HEADER_INSTALL_DIR}") |