-
-
Notifications
You must be signed in to change notification settings - Fork 3k
/
CMakeLists.txt
33 lines (26 loc) · 1.04 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
#TODO: Need to configure cmake to run pyrcc4 and pyuic4 as required when the resource
# file or the ui change
SET (OSM_PLUGIN_DIR ${QGIS_DATA_DIR}/python/plugins/osm)
FIND_PROGRAM(PYUIC4_PROGRAM pyuic4)
MACRO(PYQT4_WRAP_UI outfiles)
FOREACH(it ${ARGN})
GET_FILENAME_COMPONENT(out ${it} NAME_WE)
SET(out ${CMAKE_CURRENT_BINARY_DIR}/${out}_ui.py)
ADD_CUSTOM_COMMAND(
COMMAND ${PYUIC4_PROGRAM} ${it} -o ${out}
DEPENDS ${it}
OUTPUT ${out}
)
SET(${outfiles} ${${outfiles}} ${out})
ENDFOREACH(it)
ENDMACRO(PYQT4_WRAP_UI)
FILE (GLOB UI_FILES ui_files/*.ui)
PYQT4_WRAP_UI(PYUI_FILES ${UI_FILES})
ADD_CUSTOM_TARGET(pyuis ALL DEPENDS ${PYUI_FILES})
FILE (GLOB PYTHON_FILES *.py)
FILE (GLOB MAPTOOLS_PYTHON_FILES map_tools/*.py)
FILE (GLOB STYLE_FILES styles/*.style)
INSTALL (FILES ${PYTHON_FILES} DESTINATION ${OSM_PLUGIN_DIR})
INSTALL (FILES ${PYUI_FILES} DESTINATION ${OSM_PLUGIN_DIR})
INSTALL (FILES ${MAPTOOLS_PYTHON_FILES} DESTINATION ${OSM_PLUGIN_DIR}/map_tools)
INSTALL (FILES ${STYLE_FILES} DESTINATION ${OSM_PLUGIN_DIR}/styles)