Skip to content
Permalink
Browse files

[pyqgis] fix py files in subdirectory not correctly installed

  • Loading branch information
3nids committed May 14, 2018
1 parent 6e33bdc commit 831512c98fa1e4289a79ff29476459aade7f300b
Showing with 2 additions and 1 deletion.
  1. +2 −1 python/CMakeLists.txt
@@ -319,10 +319,11 @@ FOREACH(module ${PY_MODULES})
FILE(GLOB_RECURSE PY_FILES "${module}/*.py")
INSTALL(FILES ${PY_FILES} DESTINATION "${QGIS_PYTHON_DIR}/${module}")
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}"
COMMAND ${CMAKE_COMMAND} -E copy ${pyfile} "${QGIS_PYTHON_OUTPUT_DIRECTORY}/${module}/${subdir}"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS ${PY_FILES}
)

0 comments on commit 831512c

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