forked from osmandapp/OsmAnd-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
79 lines (72 loc) · 1.84 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
project(OsmAndCore)
set(pd_includes_private "")
if(CMAKE_TARGET_OS STREQUAL "windows")
set(pd_includes_private ${pd_includes_private}
"$ENV{JAVA_HOME}/include/win32"
)
elseif(CMAKE_TARGET_OS STREQUAL "darwin")
set(pd_includes_private ${pd_includes_private}
"$ENV{JAVA_HOME}/include/darwin"
)
elseif(CMAKE_TARGET_OS STREQUAL "linux")
set(pd_includes_private ${pd_includes_private}
"$ENV{JAVA_HOME}/include/linux"
)
endif()
set(pd_sources "")
if(CMAKE_TARGET_OS STREQUAL "linux")
elseif(CMAKE_TARGET_OS STREQUAL "darwin")
elseif(CMAKE_TARGET_OS STREQUAL "windows")
endif()
file(GLOB_RECURSE sources "src/*.c*")
file(GLOB_RECURSE headers "src/*.h*")
file(GLOB_RECURSE includes "include/*.h*")
file(GLOB_RECURSE sources_client "client/*.c*")
file(GLOB_RECURSE headers_client "client/*.h*")
add_library(OsmAndCore SHARED
${includes}
${headers}
${sources}
${sources_client}
${headers_client}
${pd_sources}
"protos/OBF.pb.h"
"native/src/ElapsedTimer.cpp"
"native/src/common.cpp"
"native/src/mapObjects.cpp"
"native/src/multipolygons.cpp"
"native/src/renderRules.cpp"
"native/src/rendering.cpp"
"native/src/binaryRead.cpp"
"native/src/binaryRoutePlanner.cpp"
"native/src/proto/osmand_index.pb.cc"
"native/src/java_wrap.cpp"
)
add_dependencies(OsmAndCore
skia_static
protobuf_static
)
target_compile_definitions(OsmAndCore
PRIVATE
-DOSMAND_CORE_EXPORTS
)
target_include_directories(OsmAndCore
PRIVATE
"${OSMAND_ROOT}/core/native/include"
"${OSMAND_ROOT}/core/native/src"
"$ENV{JAVA_HOME}/include"
${pd_includes_private}
PUBLIC
"${OSMAND_ROOT}/core/include"
"${OSMAND_ROOT}/core/src"
"${OSMAND_ROOT}/core/client"
"${OSMAND_ROOT}/core/protos"
)
target_link_libraries(OsmAndCore
LINK_PUBLIC
skia_static
protobuf_static
)
find_package(Qt5Core REQUIRED)
find_package(Qt5Network REQUIRED)
qt5_use_modules(OsmAndCore Core Network)