diff options
author | worldcitizen <worldcitizen@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2012-05-10 08:48:57 +0000 |
---|---|---|
committer | worldcitizen <worldcitizen@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2012-05-10 08:48:57 +0000 |
commit | 171cc75a49c556d8c3c50630581a9b2cb3dc0c7d (patch) | |
tree | 35aa5421d39e8e219403de424af2fbdfa39e9534 /CMakeLists.txt | |
parent | 32ee62f715348a171a4c3b29fddb7656057b44f2 (diff) | |
download | navit-svn-171cc75a49c556d8c3c50630581a9b2cb3dc0c7d.tar.gz |
CMake correction. The library files are now installed in the correct directories for LINUX and UNIX lib for 32 bit systems and lib64 for 64 biis systems
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5093 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'CMakeLists.txt')
-rwxr-xr-x | CMakeLists.txt | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 978ff492..08f3f8bb 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,30 @@ set(BIN_DIR bin) set(SHARE_DIR share/navit) set(LOCALE_DIR share/locale) set(IMAGE_DIR share/navit/xpm) -set(LIB_DIR lib) +# LIB_DIR +IF(UNIX AND NOT ANDROID) + IF (NOT LIBDIR) + MESSAGE(STATUS "LIBDIR variable is not defined. It will be autodetected now.") + MESSAGE(STATUS "You can set it manually with -DLIBDIR=<value>") + IF (NOT APPLE) + # check 64 bit + IF (CMAKE_SIZEOF_VOID_P EQUAL 4) + SET(LIB_DIR lib) + MESSAGE(STATUS " LIB_DIR (highest subdirectory if LIBDIR) is set to '${LIB_DIR}'") + ELSE (CMAKE_SIZEOF_VOID_P EQUAL 4) + SET(LIB_DIR lib64) + MESSAGE(STATUS " LIB_DIR (highest subdirectory if LIBDIR) is set to '${LIB_DIR}'") + ENDIF (CMAKE_SIZEOF_VOID_P EQUAL 4) + ELSE (NOT APPLE) + SET(LIB_DIR lib) + ENDIF (NOT APPLE) + ELSE (NOT LIBDIR) + GET_FILENAME_COMPONENT (LIB_DIR ${LIBDIR} NAME) + MESSAGE(STATUS " LIB_DIR (highest subdirectory if LIBDIR) is set to '${LIB_DIR}'") + ENDIF (NOT LIBDIR) +ELSE (UNIX AND NOT ANDROID) + SET(LIB_DIR lib) +ENDIF (UNIX AND NOT ANDROID) foreach(EXTRA_MODULE ${EXTRA_MODULES}) add_module(${EXTRA_MODULE} "extra module specified" TRUE) |