Skip to content
Permalink
Browse files

fix (again) install of qgis.core.additions

  • Loading branch information
3nids committed May 15, 2018
1 parent a0ff2af commit ff35e694bb59dafeb9e8c7c7e6fa0617605d0f77
Showing with 8 additions and 4 deletions.
  1. +8 −4 python/CMakeLists.txt
@@ -316,13 +316,17 @@ ENDFOREACH(pyfile)
FOREACH(module ${PY_MODULES})
ADD_CUSTOM_TARGET(py${module} ALL)
ADD_DEPENDENCIES(py${module} python_module_qgis__${module})
FILE(GLOB_RECURSE PY_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${module}/*.py)
INSTALL(FILES ${PY_FILES} DESTINATION "${QGIS_PYTHON_DIR}")
FILE(GLOB PY_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${module}/*.py)
FILE(GLOB PY_FILES_ADDITIONS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${module}/additions/*.py)
INSTALL(FILES ${PY_FILES} DESTINATION "${QGIS_PYTHON_DIR}/${module}")
INSTALL(FILES ${PY_FILES_ADDITIONS} DESTINATION "${QGIS_PYTHON_DIR}/${module}/additions")
SET(PY_FILES ${PY_FILES} ${PY_FILES_ADDITIONS})
FOREACH(pyfile ${PY_FILES})
GET_FILENAME_COMPONENT(subdir ${pyfile} DIRECTORY)
ADD_CUSTOM_COMMAND(TARGET py${module}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory "${QGIS_PYTHON_OUTPUT_DIRECTORY}"
COMMAND ${CMAKE_COMMAND} -E copy ${pyfile} "${QGIS_PYTHON_OUTPUT_DIRECTORY}/${pyfile}"
COMMAND ${CMAKE_COMMAND} -E make_directory "${QGIS_PYTHON_OUTPUT_DIRECTORY}/${subdir}"
COMMAND ${CMAKE_COMMAND} -E copy ${pyfile} "${QGIS_PYTHON_OUTPUT_DIRECTORY}/${subdir}"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS ${PY_FILES}
)

0 comments on commit ff35e69

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