summaryrefslogtreecommitdiff
path: root/vendor/icu.cmake
blob: 0ae1593e5e5f65b3aeef75a98348fcee7c1f8539 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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(
    mbgl-vendor-icu
    PRIVATE
        UCONFIG_NO_BREAK_ITERATION=1
        UCONFIG_NO_LEGACY_CONVERSION=1
        U_CHARSET_IS_UTF8=1
        U_CHAR_TYPE=uint_least16_t
        U_HAVE_ATOMIC=1
        U_HAVE_STRTOD_L=0
        _REENTRANT
)

target_compile_options(mbgl-vendor-icu PRIVATE -Wno-error -Wno-shorten-64-to-32)

target_include_directories(
    mbgl-vendor-icu SYSTEM
    PUBLIC ${CMAKE_CURRENT_LIST_DIR}/icu/include
)

set_property(TARGET mbgl-vendor-icu PROPERTY FOLDER Core)