blob: 68b32b9eb90d7795e5db3316234e841d78f5def6 (
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
include(platform/qt/qt.cmake)
macro(mbgl_platform_core)
target_sources(mbgl-core
${MBGL_QT_CORE_FILES}
)
target_include_directories(mbgl-core
PUBLIC platform/default/include
PRIVATE platform/qt
PRIVATE platform/qt/include
)
target_link_libraries(mbgl-core PRIVATE
${MBGL_QT_CORE_LIBRARIES}
nunicode
)
if(NOT WITH_QT_DECODERS)
target_sources(mbgl-core
PRIVATE platform/default/src/mbgl/util/jpeg_reader.cpp
PRIVATE platform/default/src/mbgl/util/png_reader.cpp
)
target_add_mason_package(mbgl-core PRIVATE libjpeg-turbo)
target_add_mason_package(mbgl-core PRIVATE libpng)
else()
add_definitions(-DQT_IMAGE_DECODERS)
endif()
if(NOT WITH_QT_I18N)
target_sources(mbgl-core PRIVATE platform/default/src/mbgl/text/bidi.cpp)
target_link_libraries(mbgl-core PRIVATE icu)
else()
target_sources(mbgl-core PRIVATE platform/qt/src/bidi.cpp)
endif()
endmacro()
macro(mbgl_filesource)
target_sources(mbgl-filesource
${MBGL_QT_FILESOURCE_FILES}
)
target_link_libraries(mbgl-filesource
${MBGL_QT_FILESOURCE_LIBRARIES}
)
endmacro()
# FIXME: For now tests are disabled on Windows until we
# get the node.js dependencies working.
if (NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
macro(mbgl_platform_test)
target_sources(mbgl-test
PRIVATE platform/qt/test/main.cpp
PRIVATE platform/qt/test/qmapboxgl.test.cpp
PRIVATE platform/qt/test/qmapboxgl.test.cpp
)
target_include_directories(mbgl-test
PRIVATE platform/qt
)
set_source_files_properties(
platform/qt/test/main.cpp
PROPERTIES COMPILE_FLAGS -DWORK_DIRECTORY="${CMAKE_SOURCE_DIR}"
)
target_link_libraries(mbgl-test
PRIVATE qmapboxgl
PRIVATE mbgl-filesource
PRIVATE -pthread
)
endmacro()
endif()
|