summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Dabrowski <[email protected]>2015-04-01 15:35:30 +0200
committerDennis Nienhüser <[email protected]>2015-04-01 15:35:30 +0200
commitc99da4abd8ba7bbbcfe5689b4c2556a521b3a0d9 (patch)
tree2ba0b9d196e289157739c2c896b42c5b7f44d340
parent527ec7a99e20195a44ee559edbb6b151965c8004 (diff)
CMake fix for empty prefix string
-rw-r--r--src/CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 6c4cc7f..e4a0a35 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -19,8 +19,8 @@ if( QT_QTDECLARATIVE_FOUND OR Qt5Quick_FOUND )
EXEC_PROGRAM( qmake ARGS "-query QT_INSTALL_QML" OUTPUT_VARIABLE MARBLE_QT_IMPORTS_DIR )
ENDIF()
ENDIF()
- STRING(LENGTH ${CMAKE_INSTALL_PREFIX} _MARBLE_CMAKE_INSTALL_PREFIX_LEN)
- STRING(LENGTH ${MARBLE_QT_IMPORTS_DIR} _MARBLE_QT_IMPORTS_DIR_LEN)
+ STRING(LENGTH "${CMAKE_INSTALL_PREFIX}" _MARBLE_CMAKE_INSTALL_PREFIX_LEN)
+ STRING(LENGTH "${MARBLE_QT_IMPORTS_DIR}" _MARBLE_QT_IMPORTS_DIR_LEN)
IF(NOT ${CMAKE_INSTALL_PREFIX} STREQUAL /usr/local)
IF(NOT ${_MARBLE_QT_IMPORTS_DIR_LEN} LESS ${_MARBLE_CMAKE_INSTALL_PREFIX_LEN})
STRING(SUBSTRING ${MARBLE_QT_IMPORTS_DIR} 0 ${_MARBLE_CMAKE_INSTALL_PREFIX_LEN} _MARBLE_QT_IMPORTS_DIR_START)