mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-23 00:02:38 -05:00
Add CMake option WITH_STAGED_PLUGINS (ON by default)
- Core plugins remain available once staged (no need to re-build targets, unless source updated or build directory cleared) - Once plugins are staged, setting WITH_STAGED_PLUGINS to OFF allows for much quicker subsequent builds - PyQGIS utilities, console and installer are always staged, regardless of WITH_STAGED_PLUGINS
This commit is contained in:
parent
9918350783
commit
d7a7a46afa
@ -76,6 +76,7 @@ IF (WITH_BINDINGS)
|
||||
# as otherwise user has to use PYTHONPATH environemnt variable to add
|
||||
# QGIS bindings to package search path
|
||||
SET (BINDINGS_GLOBAL_INSTALL FALSE CACHE BOOL "Install bindings to global python directory? (might need root)")
|
||||
SET (WITH_STAGED_PLUGINS TRUE CACHE BOOL "Stage-install core Python plugins to run from build directory? (utilities, console and installer are always staged)")
|
||||
SET (WITH_PY_COMPILE FALSE CACHE BOOL "Determines whether Python modules in staged or installed locations are byte-compiled")
|
||||
# concatenate QScintilla2 API files
|
||||
SET (WITH_QSCIAPI TRUE CACHE BOOL "Determines whether the QScintilla2 API files will be updated and concatenated")
|
||||
|
@ -8,20 +8,22 @@ ENDIF(WITH_PY_COMPILE)
|
||||
|
||||
MACRO (PLUGIN_INSTALL plugin subdir )
|
||||
INSTALL(FILES ${ARGN} DESTINATION ${QGIS_DATA_DIR}/python/plugins/${plugin}/${subdir})
|
||||
STRING(REPLACE "/" "_" subdir_sane "${subdir}")
|
||||
ADD_CUSTOM_TARGET(${plugin}_${subdir_sane}_stageinstall ALL DEPENDS ${ARGN})
|
||||
IF(WITH_PY_COMPILE)
|
||||
ADD_DEPENDENCIES(pycompile_staged ${plugin}_${subdir_sane}_stageinstall)
|
||||
ENDIF(WITH_PY_COMPILE)
|
||||
FOREACH(file ${ARGN})
|
||||
ADD_CUSTOM_COMMAND(TARGET ${plugin}_${subdir_sane}_stageinstall
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${PYTHON_OUTPUT_DIRECTORY}/plugins/${plugin}/${subdir}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy \"${file}\" ${PYTHON_OUTPUT_DIRECTORY}/plugins/${plugin}/${subdir}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
#COMMENT "copying ${file} to ${PYTHON_OUTPUT_DIRECTORY}/plugins/${plugin}/${subdir}"
|
||||
)
|
||||
ENDFOREACH(file)
|
||||
IF(WITH_STAGED_PLUGINS OR "${plugin}" STREQUAL "plugin_installer")
|
||||
STRING(REPLACE "/" "_" subdir_sane "${subdir}")
|
||||
ADD_CUSTOM_TARGET(${plugin}_${subdir_sane}_stageinstall ALL DEPENDS ${ARGN})
|
||||
IF(WITH_PY_COMPILE)
|
||||
ADD_DEPENDENCIES(pycompile_staged ${plugin}_${subdir_sane}_stageinstall)
|
||||
ENDIF(WITH_PY_COMPILE)
|
||||
FOREACH(file ${ARGN})
|
||||
ADD_CUSTOM_COMMAND(TARGET ${plugin}_${subdir_sane}_stageinstall
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${PYTHON_OUTPUT_DIRECTORY}/plugins/${plugin}/${subdir}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy \"${file}\" ${PYTHON_OUTPUT_DIRECTORY}/plugins/${plugin}/${subdir}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
#COMMENT "copying ${file} to ${PYTHON_OUTPUT_DIRECTORY}/plugins/${plugin}/${subdir}"
|
||||
)
|
||||
ENDFOREACH(file)
|
||||
ENDIF()
|
||||
ENDMACRO (PLUGIN_INSTALL)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user