Skip to content

Commit d2f51f8

Browse files
authored
Merge pull request #8209 from slarosa/fix_api_file_generator
add 3d module to API file
2 parents 7d3daf6 + 20c9a5d commit d2f51f8

File tree

3 files changed

+10
-14
lines changed

3 files changed

+10
-14
lines changed

cmake/QsciAPI.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ENDIF(EXISTS "${CMAKE_BINARY_DIR}/python/qgis.gui.api")
2222
# add qgis.core.NULL attribute defined in <src>/python/__init__.py for QPyNullVariant
2323
FILE(APPEND "${QGIS_PYTHON_API_FILE}" "qgis.core.NULL?7\n")
2424

25-
FOREACH(apiFile qgis.core.api qgis.gui.api qgis.analysis.api qgis.server.api)
25+
FOREACH(apiFile qgis.core.api qgis.gui.api qgis.analysis.api qgis.server.api qgis.qgis3d.api)
2626
SET(api "${CMAKE_BINARY_DIR}/python/${apiFile}")
2727
IF(EXISTS "${api}")
2828
FILE(READ "${api}" FILE_CONTENT)

python/CMakeLists.txt

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -142,17 +142,6 @@ IF (WITH_GUI)
142142
)
143143
ENDIF ()
144144

145-
IF (WITH_3D)
146-
INCLUDE_DIRECTORIES(
147-
${CMAKE_SOURCE_DIR}/src/3d
148-
${CMAKE_SOURCE_DIR}/src/3d/chunks
149-
${CMAKE_SOURCE_DIR}/src/3d/symbols
150-
${CMAKE_SOURCE_DIR}/src/3d/terrain
151-
152-
${CMAKE_BINARY_DIR}/src/3d
153-
)
154-
ENDIF ()
155-
156145
IF(NOT ENABLE_TESTS)
157146
SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} TESTS)
158147
ENDIF(NOT ENABLE_TESTS)
@@ -232,6 +221,13 @@ ENDIF (WITH_GUI)
232221

233222
# 3D module
234223
IF (WITH_3D)
224+
INCLUDE_DIRECTORIES(
225+
${CMAKE_SOURCE_DIR}/src/3d
226+
${CMAKE_SOURCE_DIR}/src/3d/chunks
227+
${CMAKE_SOURCE_DIR}/src/3d/symbols
228+
${CMAKE_SOURCE_DIR}/src/3d/terrain
229+
${CMAKE_BINARY_DIR}/src/3d
230+
)
235231
SET(PY_MODULES ${PY_MODULES} 3d)
236232

237233
FILE(GLOB_RECURSE sip_files_3d 3d/*.sip 3d/*.sip.in)
@@ -309,7 +305,7 @@ IF(WITH_QSCIAPI)
309305
SET(QGIS_PYTHON_API_FILE "${CMAKE_BINARY_DIR}/python/qsci_apis/PyQGIS.api")
310306

311307
ADD_CUSTOM_TARGET(qsci-api ALL
312-
DEPENDS python_module_qgis__gui python_module_qgis__core python_module_qgis__analysis)
308+
DEPENDS python_module_qgis__gui python_module_qgis__core python_module_qgis__analysis python_module_qgis__server python_module_qgis__3d)
313309

314310
# run update/concatenate command
315311
ADD_CUSTOM_COMMAND(TARGET qsci-api

python/qsci_apis/generate_console_pap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def prepareAPI(self):
7171

7272
if __name__ == '__main__':
7373
if len(sys.argv) != 4:
74-
print 'Usage: python <script> <pap_file> <apis_src_dir> <api_bin_dir>'
74+
print('Usage: python <script> <pap_file> <apis_src_dir> <api_bin_dir>')
7575
sys.exit(1)
7676
pap_file = sys.argv[1]
7777
api_src_dir = sys.argv[2]

0 commit comments

Comments
 (0)