Skip to content

Commit

Permalink
[pyqgis] fix py files in subdirectory not correctly installed
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed May 14, 2018
1 parent 6e33bdc commit 831512c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/CMakeLists.txt
Expand Up @@ -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}
)
Expand Down

0 comments on commit 831512c

Please sign in to comment.