-
-
Notifications
You must be signed in to change notification settings - Fork 3k
/
CMakeLists.txt
101 lines (86 loc) · 2.15 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
SET (OGR_SRCS
qgsogrprovider.cpp
qgsogrdataitems.cpp
qgsogrfeatureiterator.cpp
qgsogrconnpool.cpp
qgsogrexpressioncompiler.cpp
qgsgeopackagedataitems.cpp
qgsgeopackagerasterwriter.cpp
qgsgeopackagerasterwritertask.cpp
qgsogrdbconnection.cpp
qgsogrdbtablemodel.cpp
qgsogrtransaction.cpp
)
SET(OGR_MOC_HDRS
qgsogrprovider.h
qgsogrdataitems.h
qgsogrconnpool.h
qgsgeopackagedataitems.h
qgsgeopackagerasterwritertask.h
qgsogrdbconnection.h
qgsogrdbtablemodel.h
qgsogrtransaction.h
)
IF (WITH_GUI)
SET(OGR_SRCS ${OGR_SRCS}
qgsogrdbsourceselect.cpp
qgsogrsourceselect.cpp
)
SET(OGR_MOC_HDRS ${OGR_MOC_HDRS}
qgsogrsourceselect.h
qgsogrdbsourceselect.h
)
ENDIF ()
########################################################
# Build
QT5_WRAP_CPP(OGR_MOC_SRCS ${OGR_MOC_HDRS})
INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/src/core
${CMAKE_SOURCE_DIR}/src/core/auth
${CMAKE_SOURCE_DIR}/src/core/raster
${CMAKE_SOURCE_DIR}/src/core/geometry
${CMAKE_SOURCE_DIR}/src/core/metadata
${CMAKE_SOURCE_DIR}/src/core/symbology
${CMAKE_SOURCE_DIR}/src/core/expression
${CMAKE_SOURCE_DIR}/src/gui
${CMAKE_SOURCE_DIR}/src/gui/auth
${CMAKE_BINARY_DIR}/src/core
${CMAKE_BINARY_DIR}/src/gui
${CMAKE_BINARY_DIR}/src/ui
)
INCLUDE_DIRECTORIES(SYSTEM
${GDAL_INCLUDE_DIR}
${QTKEYCHAIN_INCLUDE_DIR}
${QCA_INCLUDE_DIR}
${QSCINTILLA_INCLUDE_DIR}
)
ADD_LIBRARY(ogrprovider MODULE ${OGR_SRCS} ${OGR_MOC_SRCS})
ADD_LIBRARY(ogrprovider_a STATIC ${OGR_SRCS} ${OGR_MOC_SRCS})
TARGET_LINK_LIBRARIES(ogrprovider
qgis_core
)
TARGET_LINK_LIBRARIES(ogrprovider_a
qgis_core
)
IF (WITH_GUI)
TARGET_LINK_LIBRARIES (ogrprovider
qgis_gui
)
TARGET_LINK_LIBRARIES (ogrprovider_a
qgis_gui
)
ENDIF ()
IF (MSVC)
#needed for linking to gdal which needs odbc
SET(TARGET_LINK_LIBRARIES ${TARGET_LINK_LIBRARIE} odbc32 odbccp32)
ENDIF (MSVC)
# clang-tidy
IF(CLANG_TIDY_EXE)
SET_TARGET_PROPERTIES(
ogrprovider PROPERTIES
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
)
ENDIF(CLANG_TIDY_EXE)
INSTALL (TARGETS ogrprovider
RUNTIME DESTINATION ${QGIS_PLUGIN_DIR}
LIBRARY DESTINATION ${QGIS_PLUGIN_DIR})