Improve PORT_PLUGINS cmake code

This commit is contained in:
Matthias Kuhn 2016-04-14 18:02:06 +02:00
parent 8269fc5096
commit cacf79cd96
2 changed files with 4 additions and 3 deletions

View File

@ -59,7 +59,7 @@ MACRO(PY_2TO3 TARGET_NAME RESOURCE_PATHS)
POST_BUILD
COMMAND "${PYTHON_EXECUTABLE}" "${CMAKE_SOURCE_DIR}/scripts/2to3" --no-diffs -w ${RESOURCE_PATHS}
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
COMMENT "Porting to Python 3 and Qt5"
COMMENT "Porting ${RESOURCE_PATHS} to Python 3 and Qt5"
)
ENDMACRO(PY_2TO3)

View File

@ -11,10 +11,11 @@ FILE(WRITE ${CMAKE_BINARY_DIR}/stagecount 0)
# The target port-plugins acts as a container for all port-plugin-XXX targets
# Each port-plugin-XXX target will run scripts/2to3 on a plugin and migrate
# Python 3 and Qt 5 code.
ADD_CUSTOM_TARGET(port-plugins)
SET (PORT_PLUGINS FALSE CACHE BOOL "Determines whether python plugins in staged or installed locations should be migrated to Python 3 and Qt 5")
IF(PORT_PLUGINS)
ADD_CUSTOM_TARGET(port-plugins-on-build ALL DEPENDS port-plugins)
ADD_CUSTOM_TARGET(port-plugins ALL)
ELSE(PORT_PLUGINS)
ADD_CUSTOM_TARGET(port-plugins)
ENDIF(PORT_PLUGINS)
MACRO (PLUGIN_INSTALL plugin subdir )