瀏覽代碼

Remove 'CTK_WRAP_PYTHONQT_FULL' obsolete option. See #449

* Since PythonQtGenerator was only used for Python FULL wrapping, remove
the corresponding external project.

* Remove reference to Full wrapping

* Update ctkMacroWrapPythonQt to complain if existing code invoke
the macro with 'IS_WRAP_FULL' set to TRUE
Jean-Christophe Fillion-Robin 11 年之前
父節點
當前提交
1b051e59fd

+ 2 - 3
Applications/ctkSimplePythonShell/CMakeLists.txt

@@ -81,7 +81,7 @@ if(CTK_LIB_Scripting/Python/Core AND CTK_LIB_Scripting/Python/Core_PYTHONQT_USE_
     )
 endif()
 
-# Configure file will be configured using CTK_WRAP_PYTHONQT_{LIGHT, FULL} and
+# Configure file will be configured using CTK_WRAP_PYTHONQT_LIGHT and
 # CTK_BUILD_SHARED_LIBS variables
 configure_file(
   ctkSimplePythonShellConfigure.h.in
@@ -90,8 +90,7 @@ configure_file(
 
 # The following block generate the code required to initialize the wrapper
 # when CTK is statically built.
-if(NOT CTK_BUILD_SHARED_LIBS
-   AND (CTK_WRAP_PYTHONQT_LIGHT OR CTK_WRAP_PYTHONQT_FULL))
+if(NOT CTK_BUILD_SHARED_LIBS AND CTK_WRAP_PYTHONQT_LIGHT)
 
   # Update list of target libraries with the list of available PythonQt libraries
   # and set variables holding list of pythonqt initialization method

+ 3 - 3
Applications/ctkSimplePythonShell/ctkSimplePythonManager.cpp.in

@@ -10,13 +10,13 @@
 // CTK includes
 #include "ctkSimplePythonManager.h"
 #include "ctkSimplePythonQtDecorators.h"
-#include "ctkSimplePythonShellConfigure.h" // For CTK_WRAP_PYTHONQT_{LIGHT, FULL}, CTK_WRAP_PYTHONQT_USE_VTK and CTK_BUILD_SHARED_LIBS
+#include "ctkSimplePythonShellConfigure.h" // For CTK_WRAP_PYTHONQT_LIGHT, CTK_WRAP_PYTHONQT_USE_VTK and CTK_BUILD_SHARED_LIBS
 #ifdef CTK_WRAP_PYTHONQT_USE_VTK
 # include "ctkVTKPythonQtWrapperFactory.h"
 #endif
 
 
-#if defined(CTK_WRAP_PYTHONQT_LIGHT) || defined(CTK_WRAP_PYTHONQT_FULL)
+#if defined(CTK_WRAP_PYTHONQT_LIGHT)
 # ifndef CTK_BUILD_SHARED_LIBS
   // PythonQt wrapper initialization methods
   @CTK_PYTHONQT_INITIALIZATION_METHOD_DEFINITION@
@@ -93,7 +93,7 @@ void ctkSimplePythonManager::preInitialization()
 {
   Superclass::preInitialization();
 
-#if defined(CTK_WRAP_PYTHONQT_LIGHT) || defined(CTK_WRAP_PYTHONQT_FULL)
+#if defined(CTK_WRAP_PYTHONQT_LIGHT)
 # ifndef CTK_BUILD_SHARED_LIBS
   // Initialize wrappers
   @CTK_PYTHONQT_INITIALIZATION_METHOD_CALL@

+ 0 - 1
Applications/ctkSimplePythonShell/ctkSimplePythonShellConfigure.h.in

@@ -8,7 +8,6 @@
 
 #cmakedefine CTK_BUILD_SHARED_LIBS
 #cmakedefine CTK_WRAP_PYTHONQT_LIGHT
-#cmakedefine CTK_WRAP_PYTHONQT_FULL
 
 //#define CTK_PYTHON_LIBRARY_DIR_BUILD "@LIBRARY_OUTPUT_DIRECTORY@"
 

+ 1 - 4
CMake/ctkMacroBuildLibWrapper.cmake

@@ -50,9 +50,6 @@ macro(ctkMacroBuildLibWrapper)
   if(NOT DEFINED MY_NAMESPACE)
     set(MY_NAMESPACE "org.commontk")
   endif()
-  if(NOT DEFINED CTK_WRAP_PYTHONQT_FULL)
-    set(CTK_WRAP_PYTHONQT_FULL FALSE)
-  endif()
   foreach(type RUNTIME LIBRARY ARCHIVE)
     if(NOT DEFINED MY_${type}_OUTPUT_DIRECTORY)
       set(MY_${type}_OUTPUT_DIRECTORY ${CMAKE_${type}_OUTPUT_DIRECTORY})
@@ -93,7 +90,7 @@ macro(ctkMacroBuildLibWrapper)
 
   set(KIT_PYTHONQT_SRCS) # Clear variable
   ctkMacroWrapPythonQt(${MY_NAMESPACE} ${lib_name}
-    KIT_PYTHONQT_SRCS "${MY_SRCS}" ${CTK_WRAP_PYTHONQT_FULL} ${HAS_DECORATOR})
+    KIT_PYTHONQT_SRCS "${MY_SRCS}" FALSE ${HAS_DECORATOR})
   if(HAS_DECORATOR)
     list(APPEND KIT_PYTHONQT_SRCS ${DECORATOR_HEADER})
     QT4_WRAP_CPP(KIT_PYTHONQT_SRCS ${DECORATOR_HEADER} OPTIONS -f${DECORATOR_HEADER})

+ 20 - 34
CMake/ctkMacroWrapPythonQt.cmake

@@ -25,7 +25,6 @@
 #!
 #! Depends on:
 #!  PythonQt
-#!  PythonQtGenerator (Only if IS_WRAP_FULL is TRUE)
 #!  PythonInterp (See function reSearchFile)
 #!
 
@@ -41,8 +40,6 @@
 #!
 #!    SOURCES ..........: List of source files that should be wrapped.
 #!
-#!    IS_WRAP_FULL .....: Indicate if a Full wrapping if desired.
-#!
 #!    HAS_DECORATOR ....: Indicate if a custom PythonQt decorator header is expected.
 #!
 
@@ -102,8 +99,8 @@ endfunction()
 macro(ctkMacroWrapPythonQt WRAPPING_NAMESPACE TARGET SRCS_LIST_NAME SOURCES IS_WRAP_FULL HAS_DECORATOR)
 
   # Sanity check
-  if(IS_WRAP_FULL AND NOT EXISTS "${PYTHONQTGENERATOR_EXECUTABLE}")
-    message(FATAL_ERROR "PYTHONQTGENERATOR_EXECUTABLE not specified or inexistent when calling ctkMacroWrapPythonQt")
+  if(IS_WRAP_FULL)
+    message(FATAL_ERROR "IS_WRAP_FULL option is not supported anymore. See https://github.com/commontk/CTK/issues/449")
   endif()
 
   # TODO: this find package seems not to work when called form a superbuild, but the call is needed
@@ -168,30 +165,26 @@ macro(ctkMacroWrapPythonQt WRAPPING_NAMESPACE TARGET SRCS_LIST_NAME SOURCES IS_W
     set(className ${TMP_FILENAME})
 
     if(NOT skip_wrapping)
-      # Skip wrapping if IS_WRAP_FULL=FALSE and if file do NOT contain Q_OBJECT
-      if(NOT IS_WRAP_FULL)
-        file(READ ${CMAKE_CURRENT_SOURCE_DIR}/${FILE} file_content)
-        if(NOT "${file_content}" MATCHES "Q_OBJECT")
-          set(skip_wrapping TRUE)
-          ctkMacroWrapPythonQt_log("${FILE}: skipping - No Q_OBJECT macro")
-        endif()
+      # Skip wrapping if file do NOT contain Q_OBJECT
+      file(READ ${CMAKE_CURRENT_SOURCE_DIR}/${FILE} file_content)
+      if(NOT "${file_content}" MATCHES "Q_OBJECT")
+        set(skip_wrapping TRUE)
+        ctkMacroWrapPythonQt_log("${FILE}: skipping - No Q_OBJECT macro")
       endif()
     endif()
 
     if(NOT skip_wrapping)
-      # Skip wrapping if IS_WRAP_FULL=FALSE and if constructor doesn't match:
+      # Skip wrapping if constructor doesn't match:
       #    my_class()
       #    my_class(QObject* newParent ...)
       #    my_class(QWidget* newParent ...)
-      if(NOT IS_WRAP_FULL)
-        # Constructor with either QWidget or QObject as first parameter
-        set(regex "[^~]${className}[\\s\\n]*\\([\\s\\n]*((QObject|QWidget)[\\s\\n]*\\*[\\s\\n]*\\w+[\\s\\n]*(\\=[\\s\\n]*(0|NULL)|,.*\\=.*\\)|\\)|\\)))")
-        ctkMacroWrapPythonQt_reSearchfile(${PYTHON_EXECUTABLE} ${PYTHON_LIBRARY_PATH}
-                                          ${regex} ${CMAKE_CURRENT_SOURCE_DIR}/${FILE} is_matching)
-        if(NOT is_matching)
-          set(skip_wrapping TRUE)
-          ctkMacroWrapPythonQt_log("${FILE}: skipping - Missing expected constructor signature")
-        endif()
+      # Constructor with either QWidget or QObject as first parameter
+      set(regex "[^~]${className}[\\s\\n]*\\([\\s\\n]*((QObject|QWidget)[\\s\\n]*\\*[\\s\\n]*\\w+[\\s\\n]*(\\=[\\s\\n]*(0|NULL)|,.*\\=.*\\)|\\)|\\)))")
+      ctkMacroWrapPythonQt_reSearchfile(${PYTHON_EXECUTABLE} ${PYTHON_LIBRARY_PATH}
+                                        ${regex} ${CMAKE_CURRENT_SOURCE_DIR}/${FILE} is_matching)
+      if(NOT is_matching)
+        set(skip_wrapping TRUE)
+        ctkMacroWrapPythonQt_log("${FILE}: skipping - Missing expected constructor signature")
       endif()
     endif()
 
@@ -235,14 +228,8 @@ macro(ctkMacroWrapPythonQt WRAPPING_NAMESPACE TARGET SRCS_LIST_NAME SOURCES IS_W
   endforeach()
 
   # Define wrap type and wrap intermediate directory
-  set(wrap_type "Light")
   set(wrap_int_dir generated_cpp/${WRAPPING_NAMESPACE_UNDERSCORE}_${TARGET}/)
-  set(extra_files )
-  if(${IS_WRAP_FULL})
-    set(wrap_type "Full")
-    set(extra_files ${wrap_int_dir}ctkPythonQt_${TARGET}_masterinclude.h)
-  endif()
-  #message("wrap_type:${wrap_type} - wrap_int_dir:${wrap_int_dir}")
+  #message("wrap_int_dir:${wrap_int_dir}")
 
   # Create intermediate output directory
   execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/${wrap_int_dir})
@@ -269,10 +256,9 @@ macro(ctkMacroWrapPythonQt WRAPPING_NAMESPACE TARGET SRCS_LIST_NAME SOURCES IS_W
     OUTPUT
       ${wrap_int_dir}${wrapper_init_cpp_filename}
       ${wrap_int_dir}${wrapper_module_init_cpp_filename}
-      ${extra_files}
     DEPENDS
       ${SOURCES_TO_WRAP}
-      ${CTK_CMAKE_DIR}/ctkScriptWrapPythonQt_${wrap_type}.cmake
+      ${CTK_CMAKE_DIR}/ctkScriptWrapPythonQt_Light.cmake
       ${CTK_CMAKE_DIR}/ctkMacroWrapPythonQtModuleInit.cpp.in
     COMMAND ${CMAKE_COMMAND}
       -DPYTHONQTGENERATOR_EXECUTABLE:FILEPATH=${PYTHONQTGENERATOR_EXECUTABLE}
@@ -286,8 +272,8 @@ macro(ctkMacroWrapPythonQt WRAPPING_NAMESPACE TARGET SRCS_LIST_NAME SOURCES IS_W
       -DWRAP_INT_DIR:STRING=${wrap_int_dir}
       -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
       -DHAS_DECORATOR:BOOL=${HAS_DECORATOR}
-      -P ${CTK_CMAKE_DIR}/ctkScriptWrapPythonQt_${wrap_type}.cmake
-    COMMENT "PythonQt ${wrap_type} Wrapping - Generating ${wrapper_init_cpp_filename}"
+      -P ${CTK_CMAKE_DIR}/ctkScriptWrapPythonQt_Light.cmake
+    COMMENT "PythonQt Wrapping - Generating ${wrapper_init_cpp_filename}"
     VERBATIM
     )
 
@@ -333,7 +319,7 @@ macro(ctkMacroWrapPythonQt WRAPPING_NAMESPACE TARGET SRCS_LIST_NAME SOURCES IS_W
       -DOUTPUT_DIR:PATH=${CMAKE_CURRENT_BINARY_DIR}
       -DQT_MOC_EXECUTABLE:FILEPATH=${QT_MOC_EXECUTABLE}
       -P ${CTK_CMAKE_DIR}/ctkScriptMocPythonQtWrapper.cmake
-    COMMENT "PythonQt ${wrap_type} Wrapping - Moc'ing ${WRAPPING_NAMESPACE_UNDERSCORE}_${TARGET} wrapper headers"
+    COMMENT "PythonQt Wrapping - Moc'ing ${WRAPPING_NAMESPACE_UNDERSCORE}_${TARGET} wrapper headers"
     VERBATIM
     )
 

+ 0 - 153
CMake/ctkScriptWrapPythonQt_Full.cmake

@@ -1,153 +0,0 @@
-###########################################################################
-#
-#  Library:   CTK
-#
-#  Copyright (c) Kitware Inc.
-#
-#  Licensed under the Apache License, Version 2.0 (the "License");
-#  you may not use this file except in compliance with the License.
-#  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0.txt
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-#  limitations under the License.
-#
-###########################################################################
-
-#
-# ctkScriptWrapPythonQt_Full
-#
-
-#
-# Depends on:
-#  CTK/CMake/ctkMacroWrapPythonQt.cmake
-#
-
-#
-# This script should be invoked either as a CUSTOM_COMMAND
-# or from the command line using the following syntax:
-#
-#    cmake -DWRAPPING_NAMESPACE:STRING=org.commontk -DTARGET:STRING=MyLib
-#          -DSOURCES:STRING="file1^^file2" -DINCLUDE_DIRS:STRING=/path1:/path2
-#          -DWRAP_INT_DIR:STRING=subir/subir/
-#          -DPYTHONQTGENERATOR_EXECUTABLE:FILEPATH=/path/to/exec
-#          -DOUTPUT_DIR:PATH=/path  -DQT_QMAKE_EXECUTABLE:PATH=/path/to/qt/qmake
-#          -DHAS_DECORATOR:BOOL=True
-#          -P ctkScriptWrapPythonQt_Full.cmake
-#
-
-if(NOT DEFINED CMAKE_CURRENT_LIST_DIR)
-  get_filename_component(CMAKE_CURRENT_LIST_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
-endif()
-if(NOT DEFINED CMAKE_CURRENT_LIST_FILENAME)
-  get_filename_component(CMAKE_CURRENT_LIST_FILENAME ${CMAKE_CURRENT_LIST_FILE} NAME)
-endif()
-
-# Check for non-defined var
-foreach(var SOURCES TARGET INCLUDE_DIRS WRAP_INT_DIR WRAPPING_NAMESPACE HAS_DECORATOR)
-  if(NOT DEFINED ${var})
-    message(FATAL_ERROR "${var} not specified when calling ctkScriptWrapPythonQt")
-  endif()
-endforeach()
-
-# Check for non-existing ${var}
-foreach(var PYTHONQTGENERATOR_EXECUTABLE QT_QMAKE_EXECUTABLE OUTPUT_DIR)
-  if(NOT EXISTS ${${var}})
-    message(FATAL_ERROR "Failed to find ${var} when calling ctkScriptWrapPythonQt")
-  endif()
-endforeach()
-
-# Convert wrapping namespace to subdir
-string(REPLACE "." "_" WRAPPING_NAMESPACE_UNDERSCORE ${WRAPPING_NAMESPACE})
-
-# Convert ^^ separated string to list
-string(REPLACE "^^" ";" SOURCES "${SOURCES}")
-
-foreach(FILE ${SOURCES})
-
-  # what is the filename without the extension
-  get_filename_component(TMP_FILENAME ${FILE} NAME_WE)
-
-  set(includes
-    "${includes}\n#include \"${TMP_FILENAME}.h\"")
-
-  # Extract classname - NOTE: We assume the filename matches the associated class
-  set(className ${TMP_FILENAME})
-  #message(STATUS "FILE:${FILE}, className:${className}")
-
-  set(objectTypes "${objectTypes}\n  <object-type name=\"${className}\"/>")
-
-endforeach()
-
-# Write master include file
-  file(WRITE ${OUTPUT_DIR}/${WRAP_INT_DIR}ctkPythonQt_${TARGET}_masterinclude.h "
-#ifndef __ctkPythonQt_${TARGET}_masterinclude_h
-#define __ctkPythonQt_${TARGET}_masterinclude_h
-${includes}
-#endif
-")
-
-# Write Typesystem file
-file(WRITE ${OUTPUT_DIR}/${WRAP_INT_DIR}typesystem_${TARGET}.xml "
-<typesystem package=\"${WRAPPING_NAMESPACE}.${TARGET}\">
-  ${objectTypes}
-</typesystem>
-")
-
-# Extract PYTHONQTGENERATOR_DIR
-get_filename_component(PYTHONQTGENERATOR_DIR ${PYTHONQTGENERATOR_EXECUTABLE} PATH)
-#message(PYTHONQTGENERATOR_DIR:${PYTHONQTGENERATOR_DIR})
-
-# Write Build file
-file(WRITE ${OUTPUT_DIR}/${WRAP_INT_DIR}build_${TARGET}.txt "
-<!-- File auto-generated by cmake macro ctkScriptWrapPythonQt_Full -->
-
-<typesystem>
-  <load-typesystem name=\"${PYTHONQTGENERATOR_DIR}/typesystem_core.xml\" generate=\"no\" />
-  <load-typesystem name=\"${PYTHONQTGENERATOR_DIR}/typesystem_gui.xml\" generate=\"no\" />
-  <load-typesystem name=\"${OUTPUT_DIR}/${WRAP_INT_DIR}/typesystem_${TARGET}.xml\" generate=\"yes\" />
-</typesystem>
-")
-
-# Read include dirs from file
-if(WIN32)
-  if(NOT EXISTS ${INCLUDE_DIRS})
-    message(FATAL_ERROR "On Windows, INCLUDE_DIRS should be the name of the file containing the include directories !")
-  endif()
-  file(READ ${INCLUDE_DIRS} INCLUDE_DIRS)
-endif()
-
-# Compute QTDIR
-get_filename_component(QTDIR ${QT_QMAKE_EXECUTABLE}/../../ REALPATH)
-set(ENV{QTDIR} ${QTDIR})
-
-execute_process(
-  COMMAND ${PYTHONQTGENERATOR_EXECUTABLE} --debug-level=sparse --include-paths=${INCLUDE_DIRS} --output-directory=${OUTPUT_DIR} ${OUTPUT_DIR}/${WRAP_INT_DIR}ctkPythonQt_${TARGET}_masterinclude.h ${OUTPUT_DIR}/${WRAP_INT_DIR}build_${TARGET}.txt
-  WORKING_DIRECTORY ${PYTHONQTGENERATOR_DIR}
-  RESULT_VARIABLE result
-  #OUTPUT_VARIABLE output
-  ERROR_VARIABLE error
-  OUTPUT_QUIET
-  )
-#message(${error})
-if(result)
-  message(FATAL_ERROR "Failed to generate ${WRAPPING_NAMESPACE_UNDERSCORE}_${TARGET}_init.cpp\n${error}")
-endif()
-
-# Configure 'ctkMacroWrapPythonQtModuleInit.cpp.in' replacing TARGET and
-# WRAPPING_NAMESPACE_UNDERSCORE.
-configure_file(
-  ${CMAKE_CURRENT_LIST_DIR}/ctkMacroWrapPythonQtModuleInit.cpp.in
-  ${OUTPUT_DIR}/${WRAP_INT_DIR}${WRAPPING_NAMESPACE_UNDERSCORE}_${TARGET}_module_init.cpp
-  )
-
-# Since PythonQtGenerator or file(WRITE ) doesn't 'update the timestamp - Let's touch the files
-execute_process(
-  COMMAND ${CMAKE_COMMAND} -E touch
-    ${OUTPUT_DIR}/${WRAP_INT_DIR}${WRAPPING_NAMESPACE_UNDERSCORE}_${TARGET}_init.cpp
-    ${OUTPUT_DIR}/${WRAP_INT_DIR}ctkPythonQt_${TARGET}_masterinclude.h
-  )

+ 0 - 59
CMakeExternals/PythonQtGenerator.cmake

@@ -1,59 +0,0 @@
-#
-# PythonQtGenerator
-#
-
-set(proj PythonQtGenerator)
-
-# Sanity checks
-if(DEFINED PYTHONQTGENERATOR_EXECUTABLE AND NOT EXISTS ${PYTHONQTGENERATOR_EXECUTABLE})
-  message(FATAL_ERROR "PYTHONQTGENERATOR_EXECUTABLE variable is defined but corresponds to non-existing executable")
-endif()
-
-set(${proj}_DEPENDENCIES PythonQt)
-
-ExternalProject_Include_Dependencies(${proj}
-  PROJECT_VAR proj
-  DEPENDS_VAR ${proj}_DEPENDENCIES
-  EP_ARGS_VAR ${proj}_EXTERNAL_PROJECT_ARGS
-  USE_SYSTEM_VAR ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj}
-  )
-
-if(${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj})
-  message(FATAL_ERROR "Enabling ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj} is not supported !")
-endif()
-
-if(NOT DEFINED PYTHONQTGENERATOR_EXECUTABLE)
-
-  #
-  # PythonQtGenerator is the tool allowing to generate the PythonQt decorators using
-  # typesystem xml files. If called without any option, it will generate the bindings for Qt.
-  #
-  # See http://www.pyside.org/docs/apiextractor/typesystem.html
-  # See http://doc.trolltech.com/qtjambi-4.5.2_01/com/trolltech/qt/qtjambi-typesystem.html
-  # See http://qt.gitorious.org/qt-labs/qtscriptgenerator
-  #
-
-  ExternalProject_Add(${proj}
-    ${${proj}_EXTERNAL_PROJECT_ARGS}
-    SOURCE_DIR ${CMAKE_BINARY_DIR}/PythonQt/generator
-    BINARY_DIR ${proj}-build
-    PREFIX ${proj}${ep_suffix}
-    DOWNLOAD_COMMAND ""
-    INSTALL_COMMAND ""
-    CMAKE_CACHE_ARGS
-      ${ep_common_cache_args}
-      -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
-    DEPENDS
-      ${${proj}_DEPENDENCIES} # To make sure the generator code is checked out, let's depend on PythonQt
-    )
-
-  set(PYTHONQTGENERATOR_EXECUTABLE ${CMAKE_BINARY_DIR}/PythonQtGenerator-build/PythonQtGenerator)
-
-else()
-  ExternalProject_Add_Empty(${proj} DEPENDS ${${proj}_DEPENDENCIES})
-endif()
-
-mark_as_superbuild(
-  VARS PYTHONQTGENERATOR_EXECUTABLE:FILEPATH
-  LABELS "FIND_PACKAGE"
-  )

+ 2 - 12
CMakeLists.txt

@@ -815,17 +815,11 @@ ctkMacroValidateBuildOptions("${CTK_BINARY_DIR}" "${DGraph_EXECUTABLE}" "${targe
 
 #-----------------------------------------------------------------------------
 # CTK Python wrapping
-# Enable CTK_LIB_Scripting/Python/Core if either CTK_ENABLE_Python_Wrapping OR CTK_WRAP_PYTHONQT_FULL
+# Enable CTK_LIB_Scripting/Python/Core if CTK_ENABLE_Python_Wrapping is ON
 #
 set(CTK_WRAP_PYTHONQT_LIGHT ${CTK_ENABLE_Python_Wrapping})
-option(CTK_WRAP_PYTHONQT_FULL "Experimental - Wrap CTK classes using Qt meta-object system into Python language" OFF)
-mark_as_advanced(CTK_WRAP_PYTHONQT_FULL)
-mark_as_superbuild(CTK_WRAP_PYTHONQT_FULL)
-if(CTK_WRAP_PYTHONQT_FULL AND CTK_WRAP_PYTHONQT_LIGHT)
-  message(FATAL_ERROR "CTK_ENABLE_Python_Wrapping AND CTK_WRAP_PYTHONQT_FULL options are mutually exclusive. Please enable only one !")
-endif()
 
-set(logical_expr CTK_WRAP_PYTHONQT_LIGHT OR CTK_WRAP_PYTHONQT_FULL)
+set(logical_expr CTK_WRAP_PYTHONQT_LIGHT)
 if((${logical_expr}) AND NOT CTK_LIB_Scripting/Python/Core)
   set(CTK_LIB_Scripting/Python/Core ON CACHE BOOL "Build the Python Core library" FORCE)
   set(enabling_msg)
@@ -924,10 +918,6 @@ if(CTK_USE_QTTESTING)
   list(APPEND CTK_DEPENDENCIES QtTesting)
 endif()
 
-if(CTK_WRAP_PYTHONQT_FULL)
-  list(APPEND CTK_DEPENDENCIES PythonQtGenerator)
-endif()
-
 #-----------------------------------------------------------------------------
 # Check out the ExternalProjectsContrib repository
 if(CTK_USE_CONTRIBUTED_PLUGINS)

+ 1 - 1
Libs/CommandLineModules/Backend/FunctionPointer/CMakeLists.txt

@@ -53,7 +53,7 @@ ctkMacroBuildLib(
 
 target_link_libraries(${PROJECT_NAME} ${QT_LIBRARIES})
 
-if(CTK_WRAP_PYTHONQT_FULL OR CTK_WRAP_PYTHONQT_LIGHT)
+if(CTK_WRAP_PYTHONQT_LIGHT)
   ctkMacroBuildLibWrapper(
     TARGET ${PROJECT_NAME}
     SRCS ${KIT_SRCS}

+ 1 - 1
Libs/CommandLineModules/Backend/LocalProcess/CMakeLists.txt

@@ -52,7 +52,7 @@ ctkMacroBuildLib(
 
 target_link_libraries(${PROJECT_NAME} ${QT_LIBRARIES})
 
-if(CTK_WRAP_PYTHONQT_FULL OR CTK_WRAP_PYTHONQT_LIGHT)
+if(CTK_WRAP_PYTHONQT_LIGHT)
   ctkMacroBuildLibWrapper(
     TARGET ${PROJECT_NAME}
     SRCS ${KIT_SRCS}

+ 1 - 1
Libs/CommandLineModules/Backend/XMLChecker/CMakeLists.txt

@@ -48,7 +48,7 @@ ctkMacroBuildLib(
 
 target_link_libraries(${PROJECT_NAME} ${QT_LIBRARIES})
 
-if(CTK_WRAP_PYTHONQT_FULL OR CTK_WRAP_PYTHONQT_LIGHT)
+if(CTK_WRAP_PYTHONQT_LIGHT)
   ctkMacroBuildLibWrapper(
     TARGET ${PROJECT_NAME}
     SRCS ${KIT_SRCS}

+ 1 - 1
Libs/CommandLineModules/Core/CMakeLists.txt

@@ -96,7 +96,7 @@ ctkMacroBuildLib(
 
 target_link_libraries(${PROJECT_NAME} ${QT_LIBRARIES})
 
-if(CTK_WRAP_PYTHONQT_FULL OR CTK_WRAP_PYTHONQT_LIGHT)
+if(CTK_WRAP_PYTHONQT_LIGHT)
   ctkMacroBuildLibWrapper(
     TARGET ${PROJECT_NAME}
     SRCS ${KIT_SRCS}

+ 1 - 1
Libs/CommandLineModules/Frontend/QtGui/CMakeLists.txt

@@ -60,7 +60,7 @@ ctkMacroBuildLib(
 
 target_link_libraries(${PROJECT_NAME} ${QT_LIBRARIES})
 
-if(CTK_WRAP_PYTHONQT_FULL OR CTK_WRAP_PYTHONQT_LIGHT)
+if(CTK_WRAP_PYTHONQT_LIGHT)
   ctkMacroBuildLibWrapper(
     TARGET ${PROJECT_NAME}
     SRCS ${KIT_SRCS}

+ 1 - 1
Libs/CommandLineModules/Frontend/QtWebKit/CMakeLists.txt

@@ -53,7 +53,7 @@ ctkMacroBuildLib(
 
 target_link_libraries(${PROJECT_NAME} ${QT_LIBRARIES})
 
-if(CTK_WRAP_PYTHONQT_FULL OR CTK_WRAP_PYTHONQT_LIGHT)
+if(CTK_WRAP_PYTHONQT_LIGHT)
   ctkMacroBuildLibWrapper(
     TARGET ${PROJECT_NAME}
     SRCS ${KIT_SRCS}

+ 1 - 1
Libs/Core/CMakeLists.txt

@@ -144,7 +144,7 @@ elseif(WIN32 AND NOT MINGW)
   target_link_libraries(${PROJECT_NAME} dbghelp)
 endif()
 
-if(CTK_WRAP_PYTHONQT_FULL OR CTK_WRAP_PYTHONQT_LIGHT)
+if(CTK_WRAP_PYTHONQT_LIGHT)
   ctkMacroBuildLibWrapper(
     TARGET ${PROJECT_NAME}
     SRCS ${KIT_SRCS}

+ 1 - 1
Libs/DICOM/Core/CMakeLists.txt

@@ -145,7 +145,7 @@ if(DEFINED DCMTK_HAVE_CONFIG_H_OPTIONAL AND NOT DCMTK_HAVE_CONFIG_H_OPTIONAL)
 endif()
 
 
-if(CTK_WRAP_PYTHONQT_FULL OR CTK_WRAP_PYTHONQT_LIGHT)
+if(CTK_WRAP_PYTHONQT_LIGHT)
   ctkMacroBuildLibWrapper(
     TARGET ${PROJECT_NAME}
     SRCS ${KIT_SRCS}

+ 1 - 1
Libs/DICOM/Widgets/CMakeLists.txt

@@ -95,7 +95,7 @@ ctkMacroBuildLib(
   LIBRARY_TYPE ${CTK_LIBRARY_MODE}
   )
 
-if(CTK_WRAP_PYTHONQT_FULL OR CTK_WRAP_PYTHONQT_LIGHT)
+if(CTK_WRAP_PYTHONQT_LIGHT)
   ctkMacroBuildLibWrapper(
     TARGET ${PROJECT_NAME}
     SRCS ${KIT_SRCS}

+ 1 - 1
Libs/ImageProcessing/ITK/Core/CMakeLists.txt

@@ -45,7 +45,7 @@ ctkMacroBuildLib(
   LIBRARY_TYPE ${CTK_LIBRARY_MODE}
   )
 
-if(CTK_WRAP_PYTHONQT_FULL OR CTK_WRAP_PYTHONQT_LIGHT)
+if(CTK_WRAP_PYTHONQT_LIGHT)
   ctkMacroBuildLibWrapper(
     TARGET ${PROJECT_NAME}
     SRCS ${KIT_SRCS}

+ 1 - 1
Libs/PluginFramework/CMakeLists.txt

@@ -152,7 +152,7 @@ ctkMacroBuildLib(
   LIBRARY_TYPE ${CTK_LIBRARY_MODE}
   )
 
-if(CTK_WRAP_PYTHONQT_FULL OR CTK_WRAP_PYTHONQT_LIGHT)
+if(CTK_WRAP_PYTHONQT_LIGHT)
   ctkMacroBuildLibWrapper(
     TARGET ${PROJECT_NAME}
     SRCS ${KIT_SRCS}

+ 1 - 1
Libs/QtTesting/CMakeLists.txt

@@ -177,7 +177,7 @@ ctkMacroBuildLib(
   LIBRARY_TYPE ${CTK_LIBRARY_MODE}
   )
 
-if(CTK_WRAP_PYTHONQT_FULL OR CTK_WRAP_PYTHONQT_LIGHT)
+if(CTK_WRAP_PYTHONQT_LIGHT)
   ctkMacroBuildLibWrapper(
     TARGET ${PROJECT_NAME}
     SRCS ${KIT_SRCS}

+ 1 - 1
Libs/Scripting/Python/Core/Python/CMakeLists.txt

@@ -8,7 +8,7 @@ set(KIT_PYTHON_SCRIPTS
 # the comma separated list of package to load
 set(CTK_PYTHON_WRAPPED_LIBRARIES)
 
-if(CTK_WRAP_PYTHONQT_LIGHT OR CTK_WRAP_PYTHONQT_FULL)
+if(CTK_WRAP_PYTHONQT_LIGHT)
 
   foreach(lib_name ${CTK_LIBS})
     if(${CTK_LIB_${lib_name}})

+ 1 - 1
Libs/Scripting/Python/Widgets/CMakeLists.txt

@@ -42,7 +42,7 @@ ctkMacroBuildLib(
   LIBRARY_TYPE ${CTK_LIBRARY_MODE}
   )
 
-if(CTK_WRAP_PYTHONQT_FULL OR CTK_WRAP_PYTHONQT_LIGHT)
+if(CTK_WRAP_PYTHONQT_LIGHT)
   ctkMacroBuildLibWrapper(
     TARGET ${PROJECT_NAME}
     SRCS ${KIT_SRCS}

+ 1 - 1
Libs/Visualization/VTK/Core/CMakeLists.txt

@@ -113,7 +113,7 @@ ctkMacroBuildLib(
   LIBRARY_TYPE ${CTK_LIBRARY_MODE}
   )
 
-if(CTK_WRAP_PYTHONQT_FULL OR CTK_WRAP_PYTHONQT_LIGHT)
+if(CTK_WRAP_PYTHONQT_LIGHT)
   ctkMacroBuildLibWrapper(
     TARGET ${PROJECT_NAME}
     SRCS ${KIT_SRCS}

+ 1 - 1
Libs/Visualization/VTK/Widgets/CMakeLists.txt

@@ -160,7 +160,7 @@ ctkMacroBuildLib(
   LIBRARY_TYPE ${CTK_LIBRARY_MODE}
   )
 
-if(CTK_WRAP_PYTHONQT_FULL OR CTK_WRAP_PYTHONQT_LIGHT)
+if(CTK_WRAP_PYTHONQT_LIGHT)
   ctkMacroBuildLibWrapper(
     TARGET ${PROJECT_NAME}
     SRCS ${KIT_SRCS}

+ 1 - 1
Libs/Visualization/XIP/CMakeLists.txt

@@ -41,7 +41,7 @@ ctkMacroBuildLib(
   LIBRARY_TYPE ${CTK_LIBRARY_MODE}
   )
 
-if(CTK_WRAP_PYTHONQT_FULL OR CTK_WRAP_PYTHONQT_LIGHT)
+if(CTK_WRAP_PYTHONQT_LIGHT)
   ctkMacroBuildLibWrapper(
     TARGET ${PROJECT_NAME}
     SRCS ${KIT_SRCS}

+ 1 - 1
Libs/Widgets/CMakeLists.txt

@@ -415,7 +415,7 @@ ctkMacroBuildLib(
   LIBRARY_TYPE ${CTK_LIBRARY_MODE}
   )
 
-if(CTK_WRAP_PYTHONQT_FULL OR CTK_WRAP_PYTHONQT_LIGHT)
+if(CTK_WRAP_PYTHONQT_LIGHT)
   ctkMacroBuildLibWrapper(
     TARGET ${PROJECT_NAME}
     SRCS ${KIT_SRCS}