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:
authorSergey Yershov <syershov@maps.me>2016-12-15 17:13:38 +0300
committerGitHub <noreply@github.com>2016-12-15 17:13:38 +0300
commitec9c0cd876b66d37b31116f3483ed7fc5241f62c (patch)
treea0670d6a9090a3d0c95923e1619317fa0d00f13e
parent67270ce6af0ecddeae38a790b18a861e96a2d26a (diff)
parentbb6e86a53d8b44724c0755557dc903385bfb8c45 (diff)
Merge pull request #4988 from therearesomewhocallmetim/cmake_qt_mac
Added cmake compilation for macOS app.
-rw-r--r--CMakeLists.txt2
-rw-r--r--qt/CMakeLists.txt153
-rw-r--r--qt/res/Info.plist6
3 files changed, 158 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 41a9b85f3c..f26ffcc0dd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -184,3 +184,5 @@ add_subdirectory(partners_api)
omim_add_test_subdirectory(qt_tstfrm)
omim_add_test_subdirectory(3party/gmock)
+
+add_subdirectory(qt)
diff --git a/qt/CMakeLists.txt b/qt/CMakeLists.txt
new file mode 100644
index 0000000000..ec65c4e279
--- /dev/null
+++ b/qt/CMakeLists.txt
@@ -0,0 +1,153 @@
+project(desktop)
+
+set(CMAKE_AUTOMOC ON)
+
+QT5_ADD_RESOURCES(RES_SOURCES res/resources.qrc)
+
+set(RESOURCES_FOLDER ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.app/Contents/Resources)
+set(DATA_DIR ${OMIM_ROOT}/data)
+
+execute_process(
+ COMMAND mkdir -p ${RESOURCES_FOLDER}
+)
+
+include_directories(
+ ${OMIM_ROOT}/3party/glm
+)
+
+set(
+ SRC
+ about.cpp
+ about.hpp
+ create_feature_dialog.cpp
+ create_feature_dialog.hpp
+ draw_widget.cpp
+ draw_widget.hpp
+ editor_dialog.cpp
+ editor_dialog.hpp
+ info_dialog.cpp
+ info_dialog.hpp
+ main.cpp
+ mainwindow.cpp
+ mainwindow.hpp
+ osm_auth_dialog.cpp
+ osm_auth_dialog.hpp
+ place_page_dialog.cpp
+ place_page_dialog.hpp
+ preferences_dialog.cpp
+ preferences_dialog.hpp
+ proxystyle.cpp
+ proxystyle.hpp
+ qtoglcontext.cpp
+ qtoglcontext.hpp
+ qtoglcontextfactory.cpp
+ qtoglcontextfactory.hpp
+ search_panel.cpp
+ search_panel.hpp
+ slider_ctrl.cpp
+ slider_ctrl.hpp
+ update_dialog.cpp
+ update_dialog.hpp
+)
+
+add_executable(${PROJECT_NAME} MACOSX_BUNDLE ${RES_SOURCES} ${SRC})
+
+target_link_libraries(
+ ${PROJECT_NAME}
+ map
+ drape_frontend
+ routing
+ search
+ storage
+ tracking
+ traffic
+ indexer
+ drape
+ partners_api
+ platform
+ editor geometry
+ coding
+ base
+ freetype
+ expat
+ fribidi
+ jansson
+ protobuf
+ osrm
+ stats_client
+ minizip
+ succinct
+ pugixml
+ oauthcpp
+ opening_hours
+ ${Qt5Core_LIBRARIES}
+ ${Qt5Widgets_LIBRARIES}
+ ${Qt5Gui_LIBRARIES}
+ ${LIBZ}
+)
+
+if (PLATFORM_MAC)
+ target_link_libraries(
+ ${PROJECT_NAME}
+ "-framework Foundation"
+ "-framework CoreLocation"
+ "-framework CoreWLAN"
+ "-framework IOKit"
+ "-framework SystemConfiguration"
+ "-framework OpenGL"
+ "-framework CFNetwork"
+ )
+
+ set_target_properties(
+ ${PROJECT_NAME}
+ PROPERTIES
+ MACOSX_BUNDLE_INFO_PLIST ${PROJECT_SOURCE_DIR}/res/Info.plist
+ )
+endif()
+
+function(copy_resources)
+ set(files "")
+ foreach(file ${ARGN})
+ execute_process(
+ COMMAND cp -r ${DATA_DIR}/${file} ${RESOURCES_FOLDER}
+ )
+ endforeach()
+endfunction()
+
+copy_resources(
+ countries-strings
+ resources-default
+ resources-mdpi_legacy
+ resources-mdpi_clear
+ cuisine-strings
+
+ banners.txt
+ categories.txt
+ classificator.txt
+ colors.txt
+ copyright.html
+ countries.txt
+ countries_obsolete.txt
+ drules_proto_clear.bin
+ drules_proto_dark.bin
+ drules_proto_legacy.bin
+ editor.config
+ fonts_blacklist.txt
+ fonts_whitelist.txt
+ packed_polygons.bin
+ packed_polygons_obsolete.bin
+ patterns.txt
+ types.txt
+ unicode_blocks.txt
+ World.mwm
+ WorldCoasts.mwm
+ WorldCoasts_obsolete.mwm
+
+ 01_dejavusans.ttf
+ 02_droidsans-fallback.ttf
+ 03_jomolhari-id-a3d.ttf
+ 04_padauk.ttf
+ 05_khmeros.ttf
+ 06_code2000.ttf
+ 07_roboto_medium.ttf
+)
diff --git a/qt/res/Info.plist b/qt/res/Info.plist
index 0d6e7e6ebe..e88649cdde 100644
--- a/qt/res/Info.plist
+++ b/qt/res/Info.plist
@@ -3,16 +3,16 @@
<plist version="0.9">
<dict>
<key>CFBundleName</key>
- <string>@EXECUTABLE@</string>
+ <string>MAPS.ME desktop</string>
<key>CFBundleDisplayName</key>
- <string>@EXECUTABLE@</string>
+ <string>MAPS.ME desktop</string>
<key>CFBundleVersion</key>
<string>@VERSION@</string>
<key>CFBundleIconFile</key>
- <string>@ICON@</string>
+ <string>mac.icns</string>
<key>CFBundlePackageType</key>
<string>APPL</string>