-
-
Notifications
You must be signed in to change notification settings - Fork 3k
/
CMakeLists.txt
81 lines (67 loc) · 1.7 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
########################################################
# Files
if(WITH_QSPATIALITE)
SUBDIRS(${CMAKE_SOURCE_DIR}/external/qspatialite)
endif()
set(SPATIALITE_SRCS
qgsspatialiteprovider.cpp
qgsspatialitedataitems.cpp
qgsspatialiteconnection.cpp
qgsspatialiteconnpool.cpp
qgsspatialitefeatureiterator.cpp
qgsspatialitetablemodel.cpp
qgsspatialiteproviderconnection.cpp
qgsspatialitetransaction.cpp
)
if (WITH_GUI)
set(SPATIALITE_SRCS ${SPATIALITE_SRCS}
qgsspatialiteprovidergui.cpp
qgsspatialitedataitemguiprovider.cpp
qgsspatialitesourceselect.cpp
)
endif()
########################################################
# Build
if (WITH_GUI)
include_directories(SYSTEM
${QSCINTILLA_INCLUDE_DIR}
)
endif()
include_directories(
${CMAKE_SOURCE_DIR}/external
${CMAKE_SOURCE_DIR}/src/gui
${CMAKE_SOURCE_DIR}/src/gui/codeeditors
${CMAKE_SOURCE_DIR}/external
${CMAKE_SOURCE_DIR}/external/nlohmann
${CMAKE_BINARY_DIR}/src/core
${CMAKE_BINARY_DIR}/src/gui
${CMAKE_BINARY_DIR}/src/ui
)
include_directories(SYSTEM
${GDAL_INCLUDE_DIR}
${SQLITE3_INCLUDE_DIR}
${SPATIALITE_INCLUDE_DIR}
)
add_library (spatialiteprovider MODULE ${SPATIALITE_SRCS})
target_link_libraries(spatialiteprovider
qgis_core
${SPATIALITE_LIBRARY}
)
if (WITH_GUI)
target_link_libraries (spatialiteprovider
qgis_gui
)
add_dependencies(spatialiteprovider ui)
endif()
# clang-tidy
if(CLANG_TIDY_EXE)
set_target_properties(
spatialiteprovider PROPERTIES
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
)
endif()
########################################################
# Install
install(TARGETS spatialiteprovider
RUNTIME DESTINATION ${QGIS_PLUGIN_DIR}
LIBRARY DESTINATION ${QGIS_PLUGIN_DIR})