summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <tmpsantos@gmail.com>2017-12-19 15:36:17 +0100
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2018-01-08 22:58:20 +0200
commit5786286f9cb173eaf65dd677e3fadfb181ba3825 (patch)
tree14dfb8f32a0636c1cb8cd63c9cf8d3aa8b4ca5cf
parentf391271532895c8a36cf20b6ccd20c49ee50176b (diff)
downloadqtlocation-mapboxgl-5786286f9cb173eaf65dd677e3fadfb181ba3825.tar.gz
[windows][qt] Add build defines to build Mapbox GL + Qt on Windows
-rw-r--r--platform/qt/config.cmake12
-rw-r--r--platform/qt/qt.cmake17
2 files changed, 29 insertions, 0 deletions
diff --git a/platform/qt/config.cmake b/platform/qt/config.cmake
index 76d0c2ad52..5f04367b25 100644
--- a/platform/qt/config.cmake
+++ b/platform/qt/config.cmake
@@ -1,3 +1,6 @@
+mason_use(optional VERSION f27e7908 HEADER_ONLY)
+mason_use(tao_tuple VERSION 28626e99 HEADER_ONLY)
+
include(platform/qt/qt.cmake)
if(NOT WITH_QT_DECODERS)
@@ -48,6 +51,10 @@ macro(mbgl_platform_core)
target_sources(mbgl-core PRIVATE platform/default/local_glyph_rasterizer.cpp)
+ if (CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
+ target_add_mason_package(mbgl-core PRIVATE optional)
+ target_add_mason_package(mbgl-core PRIVATE tao_tuple)
+ endif()
endmacro()
@@ -59,6 +66,11 @@ macro(mbgl_filesource)
target_link_libraries(mbgl-filesource
${MBGL_QT_FILESOURCE_LIBRARIES}
)
+
+ if (CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
+ target_add_mason_package(mbgl-filesource PRIVATE optional)
+ target_add_mason_package(mbgl-filesource PRIVATE tao_tuple)
+ endif()
endmacro()
# FIXME: For now tests are disabled on Windows until we
diff --git a/platform/qt/qt.cmake b/platform/qt/qt.cmake
index ae8b4bac99..3e81b17d00 100644
--- a/platform/qt/qt.cmake
+++ b/platform/qt/qt.cmake
@@ -124,9 +124,26 @@ elseif (CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
)
endif()
elseif (CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
+ add_definitions("-DQT_COMPILING_QIMAGE_COMPAT_CPP")
+ add_definitions("-DRAPIDJSON_HAS_CXX11_RVALUE_REFS")
+ add_definitions("-D_USE_MATH_DEFINES")
+ add_definitions("-D_WINDOWS")
+
+ add_definitions("-Wno-deprecated-declarations")
+ add_definitions("-Wno-macro-redefined")
+ add_definitions("-Wno-microsoft-exception-spec")
+ add_definitions("-Wno-unknown-argument")
+ add_definitions("-Wno-unknown-warning-option")
+ add_definitions("-Wno-unused-command-line-argument")
+ add_definitions("-Wno-unused-local-typedef")
+ add_definitions("-Wno-unused-private-field")
+
list(APPEND MBGL_QT_CORE_FILES
PRIVATE platform/qt/src/thread.cpp
)
+
+ target_add_mason_package(qmapboxgl PRIVATE optional)
+ target_add_mason_package(qmapboxgl PRIVATE tao_tuple)
endif()
add_custom_command(