Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgreshilov <slovaricheg@gmail.com>2018-01-12 15:33:07 +0300
committerYuri Gorshenin <mipt.vi002@gmail.com>2018-01-18 13:25:44 +0300
commit71d211bf1cd877a7e1373778507c33499afc41fe (patch)
treef0da64cadeb2bae89181ffc769fc895367246da4 /CMakeLists.txt
parentd4abef8634d8b89af727c45adbd5c60563d60943 (diff)
[cmake] Designer Tool final fix
Fix omim_add_test, omim_add_executable
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 9 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9f8a07ad8b..999223fa4d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -106,10 +106,16 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
set(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
-if ($ENV{QT_PATH})
+if (DEFINED ENV{QT_PATH})
+ message("Qt path is set to: " $ENV{QT_PATH})
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} $ENV{QT_PATH})
else()
- set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} "/usr/local/opt/qt5")
+ file(GLOB QT_PATH_LIST "/usr/local/opt/qt*" "/usr/lib/x86_64-linux-gnu/qt*")
+ if (QT_PATH_LIST)
+ list(GET QT_PATH_LIST 0 QT_PATH)
+ message("Found Qt path: " ${QT_PATH})
+ set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${QT_PATH})
+ endif()
endif()
if (NOT SKIP_TESTS)
@@ -230,7 +236,7 @@ endfunction()
function(omim_add_test executable)
if (NOT SKIP_TESTS)
- omim_add_executable(${executable} ${OMIM_ROOT}/testing/testingmain.cpp ${ARGN})
+ omim_add_executable(${executable} ${ARGN} ${OMIM_ROOT}/testing/testingmain.cpp)
endif()
endfunction()