File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 7
7
#
8
8
# This file defines the following macros:
9
9
#
10
- # PYTHON_INSTALL (SOURCE_FILE DESINATION_DIR )
10
+ # PYTHON_INSTALL (SOURCE_FILE DESTINATION_DIR )
11
11
# Install the SOURCE_FILE, which is a Python .py file, into the
12
12
# destination directory during install. The file will be byte compiled
13
13
# and both the .py file and .pyc file will be installed.
Original file line number Diff line number Diff line change @@ -16,8 +16,6 @@ ENDIF (WITH_INTERNAL_SPATIALITE)
16
16
17
17
SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${QGIS_PYTHON_OUTPUT_DIRECTORY} )
18
18
SET (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${QGIS_PYTHON_OUTPUT_DIRECTORY} )
19
- file (COPY __init__.py utils.py console.py DESTINATION ${QGIS_PYTHON_OUTPUT_DIRECTORY} )
20
-
21
19
22
20
INCLUDE_DIRECTORIES (
23
21
${PYTHON_INCLUDE_PATH}
@@ -90,11 +88,19 @@ FILE(GLOB sip_files_analysis analysis/*.sip)
90
88
SET (SIP_EXTRA_FILES_DEPEND ${sip_files_core} ${sip_files_analysis} )
91
89
ADD_SIP_PYTHON_MODULE (qgis.analysis analysis/analysis.sip qgis_core qgis_analysis )
92
90
93
-
94
91
SET (QGIS_PYTHON_DIR ${PYTHON_SITE_PACKAGES_DIR} /qgis )
95
92
96
93
ADD_CUSTOM_TARGET (compile_python_files ALL )
97
94
95
+ FOREACH (file __init__.py utils.py console.py )
96
+ ADD_CUSTOM_COMMAND (TARGET compile_python_files
97
+ POST_BUILD
98
+ COMMAND ${CMAKE_COMMAND} -E copy ${file} ${QGIS_PYTHON_OUTPUT_DIRECTORY}
99
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
100
+ DEPENDS ${file}
101
+ )
102
+ ENDFOREACH (file )
103
+
98
104
PYTHON_INSTALL (__init__.py ${QGIS_PYTHON_DIR} )
99
105
PYTHON_INSTALL (utils.py ${QGIS_PYTHON_DIR} )
100
106
PYTHON_INSTALL (console.py ${QGIS_PYTHON_DIR} )
You can’t perform that action at this time.
0 commit comments