diff options
author | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2019-07-23 17:35:43 +0300 |
---|---|---|
committer | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2019-09-17 12:28:55 +0300 |
commit | 8ee6cfa8fb022a7319ce83e795f4ff0d7e747ad7 (patch) | |
tree | fa7315445fd2808c35ac852f186ca592ba56b898 /vendor/icu.cmake | |
parent | e3421e042fe720d4d7b13457c4597921f31f3bcd (diff) | |
download | qtlocation-mapboxgl-8ee6cfa8fb022a7319ce83e795f4ff0d7e747ad7.tar.gz |
[build] Cosmetics on vendor packages
- Add include guards on all the files
- Add a vendor package for sqlite and gtest
- Use relative paths to all the files
Diffstat (limited to 'vendor/icu.cmake')
-rw-r--r-- | vendor/icu.cmake | 46 |
1 files changed, 26 insertions, 20 deletions
diff --git a/vendor/icu.cmake b/vendor/icu.cmake index 419b78333a..c3a05fe44b 100644 --- a/vendor/icu.cmake +++ b/vendor/icu.cmake @@ -1,22 +1,26 @@ -add_library(icu STATIC - ${CMAKE_SOURCE_DIR}/vendor/icu/src/cmemory.cpp - ${CMAKE_SOURCE_DIR}/vendor/icu/src/cstring.cpp - ${CMAKE_SOURCE_DIR}/vendor/icu/src/ubidi.cpp - ${CMAKE_SOURCE_DIR}/vendor/icu/src/ubidi_props.cpp - ${CMAKE_SOURCE_DIR}/vendor/icu/src/ubidiln.cpp - ${CMAKE_SOURCE_DIR}/vendor/icu/src/ubidiwrt.cpp - ${CMAKE_SOURCE_DIR}/vendor/icu/src/uchar.cpp - ${CMAKE_SOURCE_DIR}/vendor/icu/src/udataswp.cpp - ${CMAKE_SOURCE_DIR}/vendor/icu/src/uinvchar.cpp - ${CMAKE_SOURCE_DIR}/vendor/icu/src/umath.cpp - ${CMAKE_SOURCE_DIR}/vendor/icu/src/ushape.cpp - ${CMAKE_SOURCE_DIR}/vendor/icu/src/ustring.cpp - ${CMAKE_SOURCE_DIR}/vendor/icu/src/utf_impl.cpp - ${CMAKE_SOURCE_DIR}/vendor/icu/src/utrie2.cpp - ${CMAKE_SOURCE_DIR}/vendor/icu/src/utypes.cpp +if(TARGET mbgl-vendor-icu) + return() +endif() + +add_library(mbgl-vendor-icu STATIC + ${CMAKE_CURRENT_LIST_DIR}/icu/src/cmemory.cpp + ${CMAKE_CURRENT_LIST_DIR}/icu/src/cstring.cpp + ${CMAKE_CURRENT_LIST_DIR}/icu/src/ubidi.cpp + ${CMAKE_CURRENT_LIST_DIR}/icu/src/ubidi_props.cpp + ${CMAKE_CURRENT_LIST_DIR}/icu/src/ubidiln.cpp + ${CMAKE_CURRENT_LIST_DIR}/icu/src/ubidiwrt.cpp + ${CMAKE_CURRENT_LIST_DIR}/icu/src/uchar.cpp + ${CMAKE_CURRENT_LIST_DIR}/icu/src/udataswp.cpp + ${CMAKE_CURRENT_LIST_DIR}/icu/src/uinvchar.cpp + ${CMAKE_CURRENT_LIST_DIR}/icu/src/umath.cpp + ${CMAKE_CURRENT_LIST_DIR}/icu/src/ushape.cpp + ${CMAKE_CURRENT_LIST_DIR}/icu/src/ustring.cpp + ${CMAKE_CURRENT_LIST_DIR}/icu/src/utf_impl.cpp + ${CMAKE_CURRENT_LIST_DIR}/icu/src/utrie2.cpp + ${CMAKE_CURRENT_LIST_DIR}/icu/src/utypes.cpp ) -target_compile_definitions(icu PRIVATE +target_compile_definitions(mbgl-vendor-icu PRIVATE UCONFIG_NO_BREAK_ITERATION=1 UCONFIG_NO_LEGACY_CONVERSION=1 U_CHARSET_IS_UTF8=1 @@ -26,11 +30,13 @@ target_compile_definitions(icu PRIVATE _REENTRANT ) -target_compile_options(icu PRIVATE +target_compile_options(mbgl-vendor-icu PRIVATE -Wno-error -Wno-shorten-64-to-32 ) -target_include_directories(icu SYSTEM PUBLIC - ${CMAKE_SOURCE_DIR}/vendor/icu/include +target_include_directories(mbgl-vendor-icu SYSTEM PUBLIC + ${CMAKE_CURRENT_LIST_DIR}/icu/include ) + +set_property(TARGET mbgl-vendor-icu PROPERTY FOLDER Core) |