summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2018-09-04 17:26:24 +0200
committerKonstantin Käfer <mail@kkaefer.com>2018-09-05 12:26:15 +0200
commite51eb0fc238e24e672f2ba803fed4d527791733f (patch)
treec8af2caaa4b496d21bfb51505f8bcce98b1cad6c /cmake
parentf006eb972893368d1742379a5178f901bd2a0ec8 (diff)
downloadqtlocation-mapboxgl-e51eb0fc238e24e672f2ba803fed4d527791733f.tar.gz
[build] use vendored version of ICU
Diffstat (limited to 'cmake')
-rw-r--r--cmake/icu.cmake26
-rw-r--r--cmake/mason-dependencies.cmake7
2 files changed, 26 insertions, 7 deletions
diff --git a/cmake/icu.cmake b/cmake/icu.cmake
new file mode 100644
index 0000000000..ba98c7737a
--- /dev/null
+++ b/cmake/icu.cmake
@@ -0,0 +1,26 @@
+add_vendor_target(icu STATIC)
+
+target_compile_definitions(icu
+ PRIVATE "-D_REENTRANT"
+ PRIVATE "-DU_HAVE_ATOMIC=1"
+ PRIVATE "-DU_HAVE_STRTOD_L=0"
+ PRIVATE "-DU_CHARSET_IS_UTF8=1"
+ PRIVATE "-DU_CHAR_TYPE=uint_least16_t"
+ PRIVATE "-DUCONFIG_NO_LEGACY_CONVERSION=1"
+ PRIVATE "-DUCONFIG_NO_BREAK_ITERATION=1"
+)
+
+target_compile_options(icu
+ PRIVATE "-Wno-shadow"
+)
+
+if(MBGL_PLATFORM STREQUAL "android")
+ target_compile_options(icu
+ PRIVATE "-Wno-tautological-unsigned-enum-zero-compare"
+ )
+elseif(MBGL_PLATFORM STREQUAL "ios")
+ target_compile_options(icu
+ PRIVATE "-Wno-shorten-64-to-32"
+ )
+endif()
+
diff --git a/cmake/mason-dependencies.cmake b/cmake/mason-dependencies.cmake
index d2ea79b32b..4caa6d4d88 100644
--- a/cmake/mason-dependencies.cmake
+++ b/cmake/mason-dependencies.cmake
@@ -20,7 +20,6 @@ mason_use(vector-tile VERSION 1.0.2 HEADER_ONLY)
if(MBGL_PLATFORM STREQUAL "android")
mason_use(jni.hpp VERSION 3.0.0 HEADER_ONLY)
- mason_use(icu VERSION 58.1-min-size)
elseif(MBGL_PLATFORM STREQUAL "ios")
mason_use(icu VERSION 58.1-min-size)
elseif(MBGL_PLATFORM STREQUAL "linux")
@@ -30,7 +29,6 @@ elseif(MBGL_PLATFORM STREQUAL "linux")
mason_use(libjpeg-turbo VERSION 1.5.0)
mason_use(webp VERSION 0.5.1)
mason_use(benchmark VERSION 1.4.1${MASON_CXXABI_SUFFIX})
- mason_use(icu VERSION 58.1-min-size)
mason_use(args VERSION 6.2.0 HEADER_ONLY)
if(WITH_EGL)
@@ -39,7 +37,6 @@ elseif(MBGL_PLATFORM STREQUAL "linux")
elseif(MBGL_PLATFORM STREQUAL "macos")
mason_use(glfw VERSION 2018-06-27-0be4f3f)
mason_use(benchmark VERSION 1.4.1)
- mason_use(icu VERSION 58.1-min-size)
mason_use(args VERSION 6.2.0 HEADER_ONLY)
if(WITH_EGL)
@@ -53,8 +50,4 @@ elseif(MBGL_PLATFORM STREQUAL "qt")
mason_use(libpng VERSION 1.6.25)
mason_use(webp VERSION 0.5.1)
endif()
-
- if(NOT WITH_QT_I18N)
- mason_use(icu VERSION 58.1-min-size)
- endif()
endif()