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:
authorTimofey <t.danshin@corp.mail.ru>2016-11-25 18:59:57 +0300
committerTimofey <t.danshin@corp.mail.ru>2016-11-29 14:50:32 +0300
commit6a46e8f17f442470b907b55ce4b6e9835c8b07c5 (patch)
tree93cd76b145c96f1751cfef3d171924b736b2957f /CMakeLists.txt
parent23fa9903eb43495a60316f8329edf3a92f0b5f33 (diff)
Added cmake to XCode.
Now we can compile and run the iOS app using cmake.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt64
1 files changed, 36 insertions, 28 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4a1343f74a..c3979fc215 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,33 +4,6 @@ project(omim C CXX)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
-# Find installed packages
-
-find_package(Threads)
-
-find_package(Qt5Core REQUIRED)
-find_package(Qt5Gui REQUIRED)
-find_package(Qt5Network REQUIRED)
-find_package(Qt5OpenGL REQUIRED)
-find_package(Qt5Widgets REQUIRED)
-
-find_library(LIBZ NAMES z)
-if (LIBZ STREQUAL "LIBZ-NOTFOUND")
- message(FATAL_ERROR "Failed to find libz library.")
-endif()
-
-
-get_filename_component(OMIM_ROOT . ABSOLUTE)
-
-include_directories(
- ${CMAKE_HOME_DIRECTORY}
- ${Qt5Core_LIBRARIES}
- ${Qt5Core_INCLUDE_DIRS}
- ${Qt5Network_LIBRARIES}
- ${Qt5Network_INCLUDE_DIRS}
- ${CMAKE_HOME_DIRECTORY}/3party/boost
-)
-
# Set environment variables
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
@@ -90,6 +63,41 @@ omim_set_platform_var(PLATFORM_LINUX "linux-.*" ${LINUX_DETECTED})
# End of setting the target platform
+# Find installed packages
+
+find_package(Threads)
+
+find_package(Qt5Core REQUIRED)
+find_package(Qt5Network REQUIRED)
+if (NOT PLATFORM_IPHONE AND NOT PLATFORM_ANDROID)
+ find_package(Qt5Gui REQUIRED)
+ find_package(Qt5OpenGL REQUIRED)
+ find_package(Qt5Widgets REQUIRED)
+endif()
+
+find_library(LIBZ NAMES z)
+if (LIBZ STREQUAL "LIBZ-NOTFOUND")
+ message(FATAL_ERROR "Failed to find libz library.")
+endif()
+
+if (NOT DEVELOPER_FRAMEWORKS_DIR)
+ message("Doing nothing, because we know nothing about developer frameworks dir")
+ #do nothing
+else()
+ include_directories(${DEVELOPER_FRAMEWORKS_DIR})
+endif()
+
+get_filename_component(OMIM_ROOT . ABSOLUTE)
+
+include_directories(
+ ${CMAKE_HOME_DIRECTORY}
+ ${Qt5Core_LIBRARIES}
+ ${Qt5Core_INCLUDE_DIRS}
+ ${Qt5Network_LIBRARIES}
+ ${Qt5Network_INCLUDE_DIRS}
+ ${CMAKE_HOME_DIRECTORY}/3party/boost
+)
+
# Functions for using in subdirectories
function(omim_add_test executable)
@@ -174,4 +182,4 @@ add_subdirectory(routing)
add_subdirectory(search)
add_subdirectory(tracking)
add_subdirectory(traffic)
-add_subdirectory(partners_api) \ No newline at end of file
+add_subdirectory(partners_api)