Quellcode durchsuchen

Limit the decorators built-in ctkSimplePythonShell to Core and Widgets

Linking and initializing all the decorators associated to the CTK libraries
was causing linking errors.

This was due to the fact the associated dynamic libraries weren't link against.
Jean-Christophe Fillion-Robin vor 14 Jahren
Ursprung
Commit
ee11e70a77
1 geänderte Dateien mit 13 neuen und 2 gelöschten Zeilen
  1. 13 2
      Applications/ctkSimplePythonShell/CMakeLists.txt

+ 13 - 2
Applications/ctkSimplePythonShell/CMakeLists.txt

@@ -74,8 +74,19 @@ IF(CTK_WRAP_PYTHONQT_LIGHT OR CTK_WRAP_PYTHONQT_FULL)
   # and set variables holding list of pythonqt initialization method
   SET(CTK_PYTHONQT_INITIALIZATION_METHOD_DEFINITION)
   SET(CTK_PYTHONQT_INITIALIZATION_METHOD_CALL)
-
-  FOREACH(lib_name ${CTK_WRAPPED_LIBRARIES_PYTHONQT})
+  
+  # To avoid the complex process of resolving the dependencies associated with each 
+  # external project required by each decorator. For now, let's just include the decorator 
+  # associated with CTKCore and CTKWidgets.
+  SET(MY_CTK_WRAPPED_LIBRARIES_PYTHONQT)
+  IF(CTK_LIB_Core)
+    LIST(APPEND MY_CTK_WRAPPED_LIBRARIES_PYTHONQT CTKCore)
+  ENDIF()
+  IF(CTK_LIB_Widgets)
+    LIST(APPEND MY_CTK_WRAPPED_LIBRARIES_PYTHONQT CTKWidgets)
+  ENDIF()
+  
+  FOREACH(lib_name ${MY_CTK_WRAPPED_LIBRARIES_PYTHONQT})
 
     LIST(APPEND KIT_target_libraries ${lib_name}PythonQt)