浏览代码

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 14 年之前
父节点
当前提交
ee11e70a77
共有 1 个文件被更改,包括 13 次插入2 次删除
  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)