Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
run 2to3 only with Qt5
  • Loading branch information
jef-n committed Apr 25, 2016
1 parent 72714e6 commit aca6215
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions python/plugins/CMakeLists.txt
Expand Up @@ -8,15 +8,17 @@

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.
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 ALL)
ELSE(PORT_PLUGINS)
ADD_CUSTOM_TARGET(port-plugins)
ENDIF(PORT_PLUGINS)
IF(ENABLE_QT5)
# 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.
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 ALL)
ELSE(PORT_PLUGINS)
ADD_CUSTOM_TARGET(port-plugins)
ENDIF(PORT_PLUGINS)
ENDIF(ENABLE_QT5)

MACRO (PLUGIN_INSTALL plugin subdir )
FILE(READ ${CMAKE_BINARY_DIR}/stagecount n)
Expand Down Expand Up @@ -45,10 +47,12 @@ MACRO (PLUGIN_INSTALL plugin subdir )
ADD_CUSTOM_TARGET(staged-${plugin} DEPENDS zzz-${plugin}-stageinstall)
FILE(WRITE ${_cmake} "")

ADD_CUSTOM_TARGET(port-plugin-${plugin})
PY_2TO3(port-plugin-${plugin} ${PYTHON_OUTPUT_DIRECTORY}/plugins/${plugin})
ADD_DEPENDENCIES(port-plugins port-plugin-${plugin})
ADD_DEPENDENCIES(port-plugin-${plugin} staged-${plugin})
IF(ENABLE_QT5)
ADD_CUSTOM_TARGET(port-plugin-${plugin})
PY_2TO3(port-plugin-${plugin} ${PYTHON_OUTPUT_DIRECTORY}/plugins/${plugin})
ADD_DEPENDENCIES(port-plugins port-plugin-${plugin})
ADD_DEPENDENCIES(port-plugin-${plugin} staged-${plugin})
ENDIF(ENABLE_QT5)
ENDIF(NOT TARGET zzz-${plugin}-stageinstall)

ADD_CUSTOM_TARGET(zzz-${plugin}-${n}-depend DEPENDS ${ARGN})
Expand Down

0 comments on commit aca6215

Please sign in to comment.