-
Notifications
You must be signed in to change notification settings - Fork 85
/
CMakeLists.txt
555 lines (525 loc) · 16.8 KB
/
CMakeLists.txt
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
project(OsmAndCore)
# Bump this number each time a new source file is committed to repository, source file removed from repository or renamed: 188
set(target_specific_sources "")
set(target_specific_public_definitions "")
set(target_specific_public_includes "")
set(target_specific_public_libraries "")
set(target_specific_private_definitions "")
set(target_specific_dependencies "")
# Target specific
if (CMAKE_TARGET_OS STREQUAL "linux")
find_library(dl_LIBRARY dl)
find_library(rt_LIBRARY rt)
find_library(z_LIBRARY z)
set(target_specific_public_libraries ${target_specific_public_libraries}
${dl_LIBRARY}
${rt_LIBRARY}
${z_LIBRARY}
)
elseif (CMAKE_TARGET_OS STREQUAL "macosx")
find_library(objc_LIBRARY objc)
find_library(Cocoa_LIBRARY Cocoa)
find_library(CoreGraphics_LIBRARY CoreGraphics)
find_library(CoreText_LIBRARY CoreText)
find_library(CoreFoundation_LIBRARY CoreFoundation)
find_library(CoreServices_LIBRARY CoreServices)
find_library(SystemConfiguration_LIBRARY SystemConfiguration)
find_library(CFNetwork_LIBRARY CFNetwork)
find_library(Security_LIBRARY Security)
find_library(IOKit_LIBRARY IOKit)
find_library(z_LIBRARY z)
set(target_specific_public_libraries ${target_specific_public_libraries}
"${Cocoa_LIBRARY}/Cocoa.tbd"
"${CoreServices_LIBRARY}/CoreServices.tbd"
"${CoreText_LIBRARY}/CoreText.tbd"
"${CoreGraphics_LIBRARY}/CoreGraphics.tbd"
"${CoreFoundation_LIBRARY}/CoreFoundation.tbd"
"${SystemConfiguration_LIBRARY}/SystemConfiguration.tbd"
"${CFNetwork_LIBRARY}/CFNetwork.tbd"
"${Security_LIBRARY}/Security.tbd"
"${IOKit_LIBRARY}/IOKit.tbd"
${z_LIBRARY}
${objc_LIBRARY}
)
set(target_specific_private_definitions ${target_specific_private_definitions}
-DGL_SILENCE_DEPRECATION
)
elseif (CMAKE_TARGET_OS STREQUAL "android")
find_library(dl_LIBRARY dl)
find_library(log_LIBRARY log)
find_library(c_LIBRARY c)
find_library(stdc++_LIBRARY stdc++)
find_library(m_LIBRARY m)
set(target_specific_public_libraries ${target_specific_public_libraries}
${log_LIBRARY}
${c_LIBRARY}
${stdc++_LIBRARY}
${m_LIBRARY}
${dl_LIBRARY}
)
elseif (CMAKE_TARGET_OS STREQUAL "ios")
set(target_specific_private_definitions ${target_specific_private_definitions}
-DGLES_SILENCE_DEPRECATION
)
elseif (CMAKE_TARGET_OS STREQUAL "windows")
if (CMAKE_HOST_WIN32)
find_library(ws2_32_LIBRARY ws2_32)
else()
set(ws2_32_LIBRARY ws2_32)
endif()
set(target_specific_public_libraries ${target_specific_public_libraries}
${ws2_32_LIBRARY}
)
endif()
if (CMAKE_COMPILER_FAMILY STREQUAL "msvc")
# Set warning level 4
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} /W4")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
# Force warning to be an error "deletion of pointer to incomplete type 'type'; no destructor called"
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} /we4150")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /we4150")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /we4150")
# Disable following warnings:
# - C4290: 'C++ exception specification ignored except to indicate a function is not __declspec(nothrow)'
# - C4201: 'nonstandard extension used : nameless struct/union'
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} /wd4290 /wd4201")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4290 /wd4201")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4290 /wd4201")
elseif (CMAKE_COMPILER_FAMILY STREQUAL "gcc" OR CMAKE_COMPILER_FAMILY STREQUAL "clang")
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -Wall")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
endif()
if (CMAKE_TARGET_OS STREQUAL "linux" OR
CMAKE_TARGET_OS STREQUAL "macosx" OR
CMAKE_TARGET_OS STREQUAL "windows" OR
CMAKE_TARGET_OS STREQUAL "ios" OR
CMAKE_TARGET_OS STREQUAL "android")
file(GLOB sources_opengl "src/Map/OpenGL/*.c*")
file(GLOB headers_opengl "src/Map/OpenGL/*.h*")
set(target_specific_sources ${target_specific_sources}
${headers_opengl}
${sources_opengl}
)
set(target_specific_private_definitions ${target_specific_private_definitions}
-DOSMAND_OPENGL_RENDERERS_SUPPORTED
)
endif()
if (CMAKE_TARGET_OS STREQUAL "linux" OR
CMAKE_TARGET_OS STREQUAL "macosx" OR
CMAKE_TARGET_OS STREQUAL "windows")
find_package(OpenGL REQUIRED)
set(target_specific_private_definitions ${target_specific_private_definitions}
-DOSMAND_OPENGL2PLUS_RENDERER_SUPPORTED
)
if (CMAKE_TARGET_OS STREQUAL "linux")
set(target_specific_public_libraries ${target_specific_public_libraries}
OpenGL::EGL
)
set(target_specific_dependencies ${target_specific_dependencies}
OpenGL::EGL
)
endif()
set(target_specific_public_libraries ${target_specific_public_libraries}
OpenGL::GL
OpenGL::GLU
glew_static
)
set(target_specific_dependencies ${target_specific_dependencies}
OpenGL::GL
OpenGL::GLU
glew_static
)
file(GLOB sources_opengl2plus "src/Map/OpenGL/OpenGL2plus/*.c*")
file(GLOB headers_opengl2plus "src/Map/OpenGL/OpenGL2plus/*.h*")
set(target_specific_sources ${target_specific_sources}
${headers_opengl2plus}
${sources_opengl2plus}
)
endif()
if (CMAKE_TARGET_OS STREQUAL "ios" OR
CMAKE_TARGET_OS STREQUAL "android")
set(target_specific_private_definitions ${target_specific_private_definitions}
-DOSMAND_OPENGLES2PLUS_RENDERER_SUPPORTED
)
file(GLOB sources_opengles2plus "src/Map/OpenGL/OpenGLES2plus/*.c*")
file(GLOB headers_opengles2plus "src/Map/OpenGL/OpenGLES2plus/*.h*")
set(target_specific_sources ${target_specific_sources}
${headers_opengles2plus}
${sources_opengles2plus}
)
if (CMAKE_TARGET_OS STREQUAL "android")
find_library(EGL_LIBRARY EGL)
find_library(GLESv3_LIBRARY GLESv3)
set(target_specific_public_libraries ${target_specific_public_libraries}
${EGL_LIBRARY}
${GLESv3_LIBRARY}
)
endif()
endif()
set(CORE_LEGACY "${OSMAND_ROOT}/core-legacy")
set(LEGACY_PROTOBUF "${CORE_LEGACY}/externals/protobuf/upstream.patched")
set(LEGACY_SRC "${CORE_LEGACY}/native/src/")
set(legacy_shared_sources
"${LEGACY_SRC}/openingHoursParser.h"
"${LEGACY_SRC}/openingHoursParser.cpp"
"${LEGACY_SRC}/proto/osmand_index.pb.h"
"${LEGACY_SRC}/proto/osmand_index.pb.cc"
"${LEGACY_SRC}/proto/OBF.pb.h"
"${LEGACY_SRC}/proto/OBF.pb.cc"
"${LEGACY_SRC}/proto/vector_tile.pb.h"
"${LEGACY_SRC}/proto/vector_tile.pb.cc"
)
set(legacy_shared_dirs_public
"${CORE_LEGACY}/native/src"
"${CORE_LEGACY}/native/include"
)
set(common_legacy_sources
"${LEGACY_SRC}/multipolygons.h"
"${LEGACY_SRC}/multipolygons.cpp"
"${LEGACY_SRC}/common.cpp"
)
set(target_legacy_shared_public_includes
${legacy_shared_dirs_public}
)
if (CMAKE_TARGET_OS STREQUAL "ios")
set(legacy_sources
"${LEGACY_SRC}/routeTypeRule.h"
"${LEGACY_SRC}/routeTypeRule.cpp"
"${LEGACY_SRC}/binaryRead.h"
"${LEGACY_SRC}/binaryRead.cpp"
"${LEGACY_SRC}/binaryRoutePlanner.h"
"${LEGACY_SRC}/binaryRoutePlanner.cpp"
"${LEGACY_SRC}/commonOsmAndCore.h"
"${LEGACY_SRC}/common.cpp"
"${LEGACY_SRC}/ElapsedTimer.h"
"${LEGACY_SRC}/ElapsedTimer.cpp"
"${LEGACY_SRC}/generalRouter.h"
"${LEGACY_SRC}/generalRouter.cpp"
"${LEGACY_SRC}/transportRoutePlanner.cpp"
"${LEGACY_SRC}/transportRoutePlanner.h"
"${LEGACY_SRC}/transportRoutingConfiguration.cpp"
"${LEGACY_SRC}/transportRoutingContext.h"
"${LEGACY_SRC}/transportRoutingObjects.h"
"${LEGACY_SRC}/transportRouteResult.h"
"${LEGACY_SRC}/transportRouteResultSegment.h"
"${LEGACY_SRC}/transportRouteSegment.h"
"${LEGACY_SRC}/transportRouteResult.cpp"
"${LEGACY_SRC}/transportRouteResultSegment.cpp"
"${LEGACY_SRC}/transportRouteSegment.cpp"
"${LEGACY_SRC}/transportRoutingConfiguration.cpp"
"${LEGACY_SRC}/transportRoutingContext.cpp"
"${LEGACY_SRC}/transportRoutingObjects.cpp"
"${LEGACY_SRC}/transportRouteStopsReader.h"
"${LEGACY_SRC}/transportRouteStopsReader.cpp"
"${LEGACY_SRC}/turnType.h"
"${LEGACY_SRC}/turnType.cpp"
"${LEGACY_SRC}/routeSegment.h"
"${LEGACY_SRC}/routeCalculationProgress.h"
"${LEGACY_SRC}/routeResultPreparation.h"
"${LEGACY_SRC}/routeResultPreparation.cpp"
"${LEGACY_SRC}/routeSegmentResult.h"
"${LEGACY_SRC}/routeSegmentResult.cpp"
"${LEGACY_SRC}/routingConfiguration.h"
"${LEGACY_SRC}/routingConfiguration.cpp"
"${LEGACY_SRC}/precalculatedRouteDirection.h"
"${LEGACY_SRC}/precalculatedRouteDirection.cpp"
"${LEGACY_SRC}/routePlannerFrontEnd.h"
"${LEGACY_SRC}/routePlannerFrontEnd.cpp"
"${LEGACY_SRC}/routingContext.h"
"${LEGACY_SRC}/routingContext.cpp"
"${LEGACY_SRC}/routeDataBundle.h"
"${LEGACY_SRC}/routeDataBundle.cpp"
"${LEGACY_SRC}/routeDataResources.h"
"${LEGACY_SRC}/routeDataResources.cpp"
"${LEGACY_SRC}/routeCalculationProgress.cpp"
"${LEGACY_SRC}/renderRules.h"
"${LEGACY_SRC}/renderRules.cpp"
"${LEGACY_SRC}/hhRouteDataStructure.h"
"${LEGACY_SRC}/hhRouteDataStructure.cpp"
"${LEGACY_SRC}/hhRoutePlanner.h"
"${LEGACY_SRC}/hhRoutePlanner.cpp"
"${LEGACY_SRC}/NetworkDBPointRouteInfo.h"
"${LEGACY_SRC}/NetworkDBPointRouteInfo.cpp"
"${LEGACY_SRC}/gpxRouteApproximation.cpp"
"${LEGACY_SRC}/gpxMultiSegmentsApproximation.cpp"
"${LEGACY_SRC}/gpxSimplePointsMatchApproximation.cpp"
# $(OSMAND_PROTOBUF_RELATIVE)/src/google/protobuf/extension_set.cc \
# $(OSMAND_PROTOBUF_RELATIVE)/src/google/protobuf/generated_message_util.cc \
# $(OSMAND_PROTOBUF_RELATIVE)/src/google/protobuf/io/coded_stream.cc \
# $(OSMAND_PROTOBUF_RELATIVE)/src/google/protobuf/io/zero_copy_stream.cc \
# $(OSMAND_PROTOBUF_RELATIVE)/src/google/protobuf/io/zero_copy_stream_impl.cc \
# $(OSMAND_PROTOBUF_RELATIVE)/src/google/protobuf/io/zero_copy_stream_impl_lite.cc \
# $(OSMAND_PROTOBUF_RELATIVE)/src/google/protobuf/message_lite.cc \
# $(OSMAND_PROTOBUF_RELATIVE)/src/google/protobuf/repeated_field.cc \
# $(OSMAND_PROTOBUF_RELATIVE)/src/google/protobuf/stubs/common.cc \
# $(OSMAND_PROTOBUF_RELATIVE)/src/google/protobuf/stubs/once.cc \
# $(OSMAND_PROTOBUF_RELATIVE)/src/google/protobuf/stubs/atomicops_internals_x86_gcc.cc \
# $(OSMAND_PROTOBUF_RELATIVE)/src/google/protobuf/wire_format_lite.cc
)
set(legacy_dirs_public
"${CORE_LEGACY}/native/include"
"${CORE_LEGACY}/native/src"
"${LEGACY_PROTOBUF}/src/"
)
set(target_legacy_public_includes
${legacy_dirs_public}
)
endif()
file(GLOB includes
"include/mapbox/*.h*"
"include/Polyline2D/*.h*"
"include/proper/*.h*"
"include/tinyobjloader/*.h*"
"include/*.h*"
"include/OsmAndCore/*.h*"
"include/OsmAndCore/Concurrent/*.h*"
"include/OsmAndCore/Data/*.h*"
"include/OsmAndCore/Map/*.h*"
#"include/OsmAndCore/Routing/*.h*"
"include/OsmAndCore/Search/*.h*")
file(GLOB headers
"src/*.h*"
"src/Concurrent/*.h*"
"src/Data/*.h*"
"src/Map/*.h*"
#"src/Routing/*.h*"
"src/Search/*.h*")
file(GLOB sources
"src/*.c*"
"src/Concurrent/*.c*"
"src/Data/*.c*"
"src/Map/*.c*"
#"src/Routing/*.c*"
"src/Search/*.c*")
set(merged_sources
${includes}
${headers}
${sources}
${sources_map}
${target_specific_sources}
${legacy_shared_sources}
${legacy_sources}
${common_legacy_sources}
)
set(merged_dependencies
skia_static
protobuf_static
gdal_static
icu4c_static
harfbuzz_static
archive_static
z_static
${target_specific_dependencies}
)
set(merged_compile_definitions_public
-DGLM_FORCE_SWIZZLE
${target_specific_public_definitions}
)
set(merged_compile_definitions_private
${target_specific_private_definitions}
)
set(merged_include_dirs_private
"${OSMAND_ROOT}/core/include/OsmAndCore"
"${OSMAND_ROOT}/core/include/OsmAndCore/Concurrent"
"${OSMAND_ROOT}/core/include/OsmAndCore/Data"
"${OSMAND_ROOT}/core/include/OsmAndCore/Routing"
"${OSMAND_ROOT}/core/include/OsmAndCore/Map"
"${OSMAND_ROOT}/core/include/OsmAndCore/Search"
"${OSMAND_ROOT}/core/src"
"${OSMAND_ROOT}/core/src/Data"
"${OSMAND_ROOT}/core/src/Routing"
"${OSMAND_ROOT}/core/src/Map"
"${OSMAND_ROOT}/core/src/Search"
"${OSMAND_ROOT}/core/protos"
)
set(merged_include_dirs_public
"${OSMAND_ROOT}/core/include"
${target_specific_public_includes}
${target_legacy_shared_public_includes}
${target_legacy_public_includes}
)
set(merged_link_libs_public
skia_static
protobuf_static
gdal_static
sqlite_static
icu4c_static
harfbuzz_static
archive_static
glm_headers_only
boost_static_precompiled
GeographicLib_STATIC
${target_specific_public_libraries}
)
if (OSMAND_OWN_SHIPPED_QT)
# When using embedded Qt, we need to use tools from either static or shared
# version of qt.
set(Qt5Core_DIR "${OSMAND_OWN_SHIPPED_QT_STATIC}/lib/cmake/Qt5Core")
find_package(Qt5Core REQUIRED)
else()
# If not using embedded QT, find packages it as usual
find_package(Qt5Core REQUIRED)
find_package(Qt5Network REQUIRED)
endif()
if (CMAKE_SHARED_LIBS_ALLOWED_ON_TARGET)
# 'OsmAndCore_shared' - linking to Qt shared libraries (or any if not own-shipped), OsmAndCore shared
add_library(OsmAndCore_shared SHARED
${merged_sources})
add_dependencies(OsmAndCore_shared
${merged_dependencies})
target_compile_definitions(OsmAndCore_shared
PRIVATE
-DOSMAND_CORE_INTERNAL
-DOSMAND_CORE_EXPORTS
${merged_compile_definitions_private}
PUBLIC
${merged_compile_definitions_public}
)
target_include_directories(OsmAndCore_shared
PRIVATE
${merged_include_dirs_private}
PUBLIC
${merged_include_dirs_public}
)
if (OSMAND_OWN_SHIPPED_QT)
target_include_directories(OsmAndCore_shared
PUBLIC
"${OSMAND_OWN_SHIPPED_QT_SHARED}/include"
"${OSMAND_OWN_SHIPPED_QT_SHARED}/include/QtCore"
"${OSMAND_OWN_SHIPPED_QT_SHARED}/include/QtNetwork"
)
target_link_libraries(OsmAndCore_shared
LINK_PUBLIC
${Qt5Network_SHARED_LIBRARIES}
${Qt5Core_SHARED_LIBRARIES}
${qtpcre_SHARED_LIBRARIES}
)
else()
target_link_libraries(OsmAndCore_shared
LINK_PUBLIC
Qt5::Network
Qt5::Core
)
endif()
target_link_libraries(OsmAndCore_shared
LINK_PUBLIC
${merged_link_libs_public}
)
endif()
if (CMAKE_STATIC_LIBS_ALLOWED_ON_TARGET AND
CMAKE_SHARED_LIBS_ALLOWED_ON_TARGET)
# 'OsmAndCore_static' - linking to Qt shared libraries (or any if not own-shipped), OsmAndCore static
add_library(OsmAndCore_static STATIC
${merged_sources})
add_dependencies(OsmAndCore_static
${merged_dependencies})
target_compile_definitions(OsmAndCore_static
PRIVATE
-DOSMAND_CORE_INTERNAL
${merged_compile_definitions_private}
PUBLIC
-DOSMAND_CORE_STATIC
${merged_compile_definitions_public}
)
target_include_directories(OsmAndCore_static
PRIVATE
${merged_include_dirs_private}
PUBLIC
${merged_include_dirs_public}
)
if (OSMAND_OWN_SHIPPED_QT)
target_include_directories(OsmAndCore_static
PUBLIC
"${OSMAND_OWN_SHIPPED_QT_SHARED}/include"
"${OSMAND_OWN_SHIPPED_QT_SHARED}/include/QtCore"
"${OSMAND_OWN_SHIPPED_QT_SHARED}/include/QtNetwork"
)
target_link_libraries(OsmAndCore_static
LINK_PUBLIC
${Qt5Network_SHARED_LIBRARIES}
${Qt5Core_SHARED_LIBRARIES}
${qtpcre_SHARED_LIBRARIES}
)
else()
target_link_libraries(OsmAndCore_static
LINK_PUBLIC
Qt5::Network
Qt5::Core
)
endif()
target_link_libraries(OsmAndCore_static
LINK_PUBLIC
${merged_link_libs_public}
)
endif()
if (CMAKE_STATIC_LIBS_ALLOWED_ON_TARGET AND
OSMAND_OWN_SHIPPED_QT)
if (CMAKE_SHARED_LIBS_ALLOWED_ON_TARGET)
# 'OsmAndCore_shared_standalone' - linking to Qt static libraries, OsmAndCore shared
add_library(OsmAndCore_shared_standalone SHARED
${merged_sources})
add_dependencies(OsmAndCore_shared_standalone
${merged_dependencies})
target_compile_definitions(OsmAndCore_shared_standalone
PRIVATE
-DOSMAND_CORE_INTERNAL
-DOSMAND_CORE_EXPORTS
${merged_compile_definitions_private}
PUBLIC
${merged_compile_definitions_public}
)
target_include_directories(OsmAndCore_shared_standalone
PRIVATE
${merged_include_dirs_private}
PUBLIC
${merged_include_dirs_public}
)
target_include_directories(OsmAndCore_shared_standalone
PUBLIC
"${OSMAND_OWN_SHIPPED_QT_STATIC}/include"
"${OSMAND_OWN_SHIPPED_QT_STATIC}/include/QtCore"
"${OSMAND_OWN_SHIPPED_QT_STATIC}/include/QtNetwork"
)
target_link_libraries(OsmAndCore_shared_standalone
LINK_PUBLIC
${Qt5Network_STATIC_LIBRARIES}
${Qt5Core_STATIC_LIBRARIES}
${qtpcre_STATIC_LIBRARIES}
${merged_link_libs_public}
)
endif()
# 'OsmAndCore_static_standalone' - linking to Qt static libraries, OsmAndCore static
add_library(OsmAndCore_static_standalone STATIC
${merged_sources})
add_dependencies(OsmAndCore_static_standalone
${merged_dependencies})
target_compile_definitions(OsmAndCore_static_standalone
PRIVATE
-DOSMAND_CORE_INTERNAL
${merged_compile_definitions_private}
PUBLIC
-DOSMAND_CORE_STATIC
${merged_compile_definitions_public}
)
target_include_directories(OsmAndCore_static_standalone
PRIVATE
${merged_include_dirs_private}
PUBLIC
${merged_include_dirs_public}
)
target_include_directories(OsmAndCore_static_standalone
PUBLIC
"${OSMAND_OWN_SHIPPED_QT_STATIC}/include"
"${OSMAND_OWN_SHIPPED_QT_STATIC}/include/QtCore"
"${OSMAND_OWN_SHIPPED_QT_STATIC}/include/QtNetwork"
)
target_link_libraries(OsmAndCore_static_standalone
LINK_PUBLIC
${Qt5Network_STATIC_LIBRARIES}
${Qt5Core_STATIC_LIBRARIES}
${qtpcre_STATIC_LIBRARIES}
${merged_link_libs_public}
)
endif()