Skip to content
Permalink
Browse files

also install additions py files in their directory (#7000)

  • Loading branch information
3nids committed May 15, 2018
1 parent a687744 commit cd34da80389b001f776450f0a65b0d38e92de742
Showing with 4 additions and 5 deletions.
  1. +4 −5 python/CMakeLists.txt
@@ -316,14 +316,13 @@ 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 "${module}/*.py")
INSTALL(FILES ${PY_FILES} DESTINATION "${QGIS_PYTHON_DIR}/${module}")
FILE(GLOB_RECURSE PY_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${module}/*.py)
INSTALL(FILES ${PY_FILES} DESTINATION "${QGIS_PYTHON_DIR}")
FOREACH(pyfile ${PY_FILES})
FILE(RELATIVE_PATH subdir ${CMAKE_CURRENT_SOURCE_DIR}/${module} ${pyfile})
ADD_CUSTOM_COMMAND(TARGET py${module}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory "${QGIS_PYTHON_OUTPUT_DIRECTORY}/${module}"
COMMAND ${CMAKE_COMMAND} -E copy ${pyfile} "${QGIS_PYTHON_OUTPUT_DIRECTORY}/${module}/${subdir}"
COMMAND ${CMAKE_COMMAND} -E make_directory "${QGIS_PYTHON_OUTPUT_DIRECTORY}"
COMMAND ${CMAKE_COMMAND} -E copy ${pyfile} "${QGIS_PYTHON_OUTPUT_DIRECTORY}/${pyfile}"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS ${PY_FILES}
)

0 comments on commit cd34da8

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