Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[cmake] generalize Python output directory in UseTest macro (#43191)
* [cmake] generalize Python output directory in UseTest macro this is helpful in case we set up another python output directory (eg PySide2) * define python output directories to the parent scope * try with target_include_directories * define vars on top level * Update UsePythonTest.cmake * some cleanup * more cleanup * fix uic * fix path for all platforms * fix var
- Loading branch information
Showing
10 changed files
with
18 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,23 @@ | ||
# See ../CMakeLists.txt for info on staged-plugins* and clean-staged-plugins targets | ||
|
||
set(QGIS_PYTHON_DIR ${Python_SITEARCH}/qgis) | ||
set (PYTHON_OUTPUT_DIRECTORY ${QGIS_OUTPUT_DIRECTORY}/python) | ||
set (NAME processing) | ||
|
||
set(PY_FILES | ||
__init__.py | ||
algfactory.py | ||
) | ||
|
||
file (MAKE_DIRECTORY ${QGIS_PYTHON_OUTPUT_DIRECTORY}/${NAME}) | ||
install(FILES ${PY_FILES} DESTINATION "${QGIS_PYTHON_DIR}/${NAME}") | ||
file (MAKE_DIRECTORY ${QGIS_PYTHON_OUTPUT_DIRECTORY}/processing) | ||
install(FILES ${PY_FILES} DESTINATION "${QGIS_PYTHON_DIR}/processing") | ||
|
||
add_custom_target(py${NAME} ALL) | ||
add_custom_target(pyprocessing ALL) | ||
# stage to output to make available when QGIS is run from build directory | ||
foreach(pyfile ${PY_FILES}) | ||
add_custom_command(TARGET py${NAME} | ||
add_custom_command(TARGET pyprocessing | ||
POST_BUILD | ||
COMMAND ${CMAKE_COMMAND} -E copy ${pyfile} "${QGIS_PYTHON_OUTPUT_DIRECTORY}/${NAME}" | ||
COMMAND ${CMAKE_COMMAND} -E copy ${pyfile} "${QGIS_PYTHON_OUTPUT_DIRECTORY}/processing" | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | ||
DEPENDS ${pyfile} | ||
) | ||
PY_COMPILE(pyutils "${QGIS_PYTHON_OUTPUT_DIRECTORY}/${NAME}/${pyfile}") | ||
PY_COMPILE(pyutils "${QGIS_PYTHON_OUTPUT_DIRECTORY}/processing/${pyfile}") | ||
endforeach(pyfile) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters