diff options
author | r.kuznetsov <r.kuznetsov@corp.mail.ru> | 2017-05-30 12:02:20 +0300 |
---|---|---|
committer | Ilya Zverev <ilya@zverev.info> | 2017-07-04 11:26:12 +0300 |
commit | 1fafff5b00b81e89056bc754589c2f3bc3a6aacd (patch) | |
tree | 7ec2809ea4feaf6b98a07b8a03672b7d9e6ed1ec /CMakeLists.txt | |
parent | accc48d7b86be276efa07c2a7ee33bd72e66cd56 (diff) |
Added possibility to run from IDE
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 39 |
1 files changed, 9 insertions, 30 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 9a3eadd740..f014dee87d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,39 +2,15 @@ cmake_minimum_required(VERSION 3.2) project(omim C CXX) -set(CMAKE_POSITION_INDEPENDENT_CODE ON) - -# Set environment variables - -set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}) -set(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}) - -if ($ENV{QT_PATH}) - set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} $ENV{QT_PATH}) +# Options +option(BUILD_DESIGNER "Build application as design tool" OFF) +if (BUILD_DESIGNER) + message("Designer tool building is enabled") + add_definitions(-DBUILD_DESIGNER) else() - set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} "/usr/local/opt/qt5") -endif() - -if (NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "Release") + message("Designer tool building is disabled") endif() -if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") - add_definitions(-DDEBUG) -endif() - -if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release") - add_definitions(-DRELEASE) -endif() - -if (NOT SKIP_TESTS) - set(SKIP_TESTS FALSE) -endif() - -add_definitions(-DBUILD_DESIGNER) - -# End of setting environment variables - # Set target platform: function(omim_set_platform_var PLATFORM_VAR pattern) set(${PLATFORM_VAR} FALSE PARENT_SCOPE) @@ -160,6 +136,8 @@ if (NOT PLATFORM_IPHONE AND NOT PLATFORM_ANDROID) find_package(Qt5Gui REQUIRED) find_package(Qt5OpenGL REQUIRED) find_package(Qt5Widgets REQUIRED) + find_package(Qt5Xml REQUIRED) + find_package(Qt5Svg REQUIRED) endif() if (PLATFORM_LINUX) @@ -348,6 +326,7 @@ add_subdirectory(local_ads) if (PLATFORM_DESKTOP) add_subdirectory(openlr) add_subdirectory(generator) + add_subdirectory(skin_generator) endif() omim_add_test_subdirectory(qt_tstfrm) |