-
-
Notifications
You must be signed in to change notification settings - Fork 3k
/
CMakeLists.txt
79 lines (61 loc) · 1.65 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
########################################################
# Files
set (QGIS_VLAYER_SQL_FUNCTIONS_RCCS sqlfunctionslist.qrc)
set(QGIS_VLAYER_PROVIDER_HDRS
qgsvirtuallayerprovider.h
qgsslottofunction.h
)
set(QGIS_VLAYER_PROVIDER_SRCS
qgsvirtuallayerprovider.cpp
qgsvirtuallayerfeatureiterator.cpp
qgsvirtuallayerblob.cpp
qgsvirtuallayersqlitemodule.cpp
qgsvirtuallayersqlitehelper.cpp
qgsvirtuallayerqueryparser.cpp
)
if (WITH_GUI)
set(QGIS_VLAYER_PROVIDER_SRCS ${QGIS_VLAYER_PROVIDER_SRCS}
qgsvirtuallayersourceselect.cpp
qgsembeddedlayerselectdialog.cpp
)
set(QGIS_VLAYER_PROVIDER_HDRS ${QGIS_VLAYER_PROVIDER_HDRS}
qgsvirtuallayersourceselect.h
qgsembeddedlayerselectdialog.h
)
endif()
if (WITH_GUI)
QT5_WRAP_UI(vlayer_provider_UI_H qgsvirtuallayersourceselectbase.ui qgsembeddedlayerselect.ui)
endif()
include_directories(
${CMAKE_BINARY_DIR}/src/ui
${CMAKE_CURRENT_BINARY_DIR} # ui_xxx_dlg.h
)
include_directories(SYSTEM
${POSTGRES_INCLUDE_DIR}
)
add_library(virtuallayerprovider MODULE
${QGIS_VLAYER_PROVIDER_SRCS}
${QGIS_VLAYER_PROVIDER_HDRS}
${vlayer_provider_UI_H}
${QGIS_VLAYER_SQL_FUNCTIONS_RCCS}
)
# require c++17
target_compile_features(virtuallayerprovider PRIVATE cxx_std_17)
target_link_libraries( virtuallayerprovider
qgis_core
${Qt5Core_LIBRARIES}
${Qt5Gui_LIBRARIES}
${Qt5Widgets_LIBRARIES}
${SQLITE3_LIBRARY}
${SPATIALITE_LIBRARY}
)
if (WITH_GUI)
target_link_libraries (virtuallayerprovider
qgis_gui
)
add_dependencies(virtuallayerprovider ui)
endif()
install(TARGETS virtuallayerprovider
RUNTIME DESTINATION ${QGIS_PLUGIN_DIR}
LIBRARY DESTINATION ${QGIS_PLUGIN_DIR}
)