Skip to content

Commit

Permalink
add 3d module to API file
Browse files Browse the repository at this point in the history
  • Loading branch information
slarosa committed Oct 16, 2018
1 parent 4cc4bab commit 20c9a5d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion cmake/QsciAPI.cmake
Expand Up @@ -22,7 +22,7 @@ ENDIF(EXISTS "${CMAKE_BINARY_DIR}/python/qgis.gui.api")
# add qgis.core.NULL attribute defined in <src>/python/__init__.py for QPyNullVariant
FILE(APPEND "${QGIS_PYTHON_API_FILE}" "qgis.core.NULL?7\n")

FOREACH(apiFile qgis.core.api qgis.gui.api qgis.analysis.api qgis.server.api)
FOREACH(apiFile qgis.core.api qgis.gui.api qgis.analysis.api qgis.server.api qgis.qgis3d.api)
SET(api "${CMAKE_BINARY_DIR}/python/${apiFile}")
IF(EXISTS "${api}")
FILE(READ "${api}" FILE_CONTENT)
Expand Down
20 changes: 8 additions & 12 deletions python/CMakeLists.txt
Expand Up @@ -142,17 +142,6 @@ IF (WITH_GUI)
)
ENDIF ()

IF (WITH_3D)
INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/src/3d
${CMAKE_SOURCE_DIR}/src/3d/chunks
${CMAKE_SOURCE_DIR}/src/3d/symbols
${CMAKE_SOURCE_DIR}/src/3d/terrain

${CMAKE_BINARY_DIR}/src/3d
)
ENDIF ()

IF(NOT ENABLE_TESTS)
SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} TESTS)
ENDIF(NOT ENABLE_TESTS)
Expand Down Expand Up @@ -232,6 +221,13 @@ ENDIF (WITH_GUI)

# 3D module
IF (WITH_3D)
INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/src/3d
${CMAKE_SOURCE_DIR}/src/3d/chunks
${CMAKE_SOURCE_DIR}/src/3d/symbols
${CMAKE_SOURCE_DIR}/src/3d/terrain
${CMAKE_BINARY_DIR}/src/3d
)
SET(PY_MODULES ${PY_MODULES} 3d)

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

ADD_CUSTOM_TARGET(qsci-api ALL
DEPENDS python_module_qgis__gui python_module_qgis__core python_module_qgis__analysis)
DEPENDS python_module_qgis__gui python_module_qgis__core python_module_qgis__analysis python_module_qgis__server python_module_qgis__3d)

# run update/concatenate command
ADD_CUSTOM_COMMAND(TARGET qsci-api
Expand Down
2 changes: 1 addition & 1 deletion python/qsci_apis/generate_console_pap.py
Expand Up @@ -71,7 +71,7 @@ def prepareAPI(self):

if __name__ == '__main__':
if len(sys.argv) != 4:
print 'Usage: python <script> <pap_file> <apis_src_dir> <api_bin_dir>'
print('Usage: python <script> <pap_file> <apis_src_dir> <api_bin_dir>')
sys.exit(1)
pap_file = sys.argv[1]
api_src_dir = sys.argv[2]
Expand Down

0 comments on commit 20c9a5d

Please sign in to comment.