summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJoseph Herlant <aerostitch@users.noreply.github.com>2018-06-03 10:00:18 -0700
committerGitHub <noreply@github.com>2018-06-03 10:00:18 -0700
commitf759dfe3b54da9daefd636bd9f291a51cc4ccfcf (patch)
treee10ca239fcc1b7254adfe0cef1fa2336cb9d39da /CMakeLists.txt
parentf42d45e6b5ceab72a51c4ec9456fdc973f9611dd (diff)
downloadnavit-f759dfe3b54da9daefd636bd9f291a51cc4ccfcf.tar.gz
Fix:cmake:Fix the way we set the LIB_DIR when LIBDIR is set for backward compatibility (#574)
Diffstat (limited to 'CMakeLists.txt')
-rwxr-xr-xCMakeLists.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 74a2a292e..dd0b93eca 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -48,15 +48,15 @@ IF(UNIX AND NOT ANDROID AND NOT APPLE)
MESSAGE(STATUS "You can set it manually with -DLIBDIR=<value>")
# check 64 bit
IF (CMAKE_SIZEOF_VOID_P EQUAL 4)
- SET(LIB_DIR lib/navit CACHE PATH "Navit 32bit bin path")
+ SET(LIB_DIR lib/${PACKAGE} CACHE PATH "Navit 32bit bin path")
MESSAGE(STATUS " LIB_DIR (highest subdirectory if LIBDIR) is set to '${LIB_DIR}'")
ELSE (CMAKE_SIZEOF_VOID_P EQUAL 4)
- SET(LIB_DIR lib64/navit CACHE PATH "Navit 64bit bin path")
+ SET(LIB_DIR lib64/${PACKAGE} CACHE PATH "Navit 64bit bin path")
MESSAGE(STATUS " LIB_DIR (highest subdirectory if LIBDIR) is set to '${LIB_DIR}'")
ENDIF (CMAKE_SIZEOF_VOID_P EQUAL 4)
ELSE (NOT LIBDIR)
- GET_FILENAME_COMPONENT (LIB_DIR ${LIBDIR} NAME)
- MESSAGE(STATUS " LIB_DIR (highest subdirectory if LIBDIR) is set to '${LIB_DIR}'")
+ SET (LIB_DIR ${LIBDIR}/${PACKAGE} CACHE PATH "Navit lib path")
+ MESSAGE(STATUS " LIB_DIR is set to '${LIB_DIR}' because LIBDIR is set to ${LIBDIR}")
ENDIF (NOT LIBDIR)
ELSE (UNIX AND NOT ANDROID AND NOT APPLE)
SET(LIB_DIR lib/navit CACHE PATH "Navit unix bin path")