Skip to content
Permalink
Browse files

Merge pull request #8209 from slarosa/fix_api_file_generator

add 3d module to API file
  • Loading branch information
slarosa committed Oct 16, 2018
2 parents 7d3daf6 + 20c9a5d commit d2f51f8f8fadffb9e3763829c6377efa2f047a13
Showing with 10 additions and 14 deletions.
  1. +1 −1 cmake/QsciAPI.cmake
  2. +8 −12 python/CMakeLists.txt
  3. +1 −1 python/qsci_apis/generate_console_pap.py
@@ -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)
@@ -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)
@@ -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)
@@ -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)

This comment has been minimized.

Copy link
@borysiasty

borysiasty Oct 16, 2018

Member

@slarosa It breaks buliding without server and 3d. In the same time @nyalldawson broke building with 3d, so now we are lost ;p

make[2]: *** No rule to make target '../python/python_module_qgis__server', needed by 'python/CMakeFiles/qsci-api'.  Stop.
make[1]: *** [CMakeFiles/Makefile2:4336: python/CMakeFiles/qsci-api.dir/all] Error 2

This comment has been minimized.

Copy link
@slarosa

slarosa Oct 16, 2018

Author Member

sorry, should be fixed in 3cb9ef2

This comment has been minimized.

Copy link
@borysiasty

borysiasty Oct 16, 2018

Member

Thanks!


# run update/concatenate command
ADD_CUSTOM_COMMAND(TARGET qsci-api
@@ -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]

0 comments on commit d2f51f8

Please sign in to comment.
You can’t perform that action at this time.