|
@@ -3,7 +3,10 @@ project(ctkSimplePythonShell)
|
|
|
#
|
|
|
# 3rd party dependencies
|
|
|
#
|
|
|
-include(${VTK_USE_FILE})
|
|
|
+if(CTK_LIB_Scripting/Python/Core AND CTK_LIB_Scripting/Python/Core_PYTHONQT_USE_VTK)
|
|
|
+ find_package(VTK REQUIRED)
|
|
|
+ include(${VTK_USE_FILE})
|
|
|
+endif()
|
|
|
|
|
|
#
|
|
|
# See CTK/CMake/ctkMacroBuildApp.cmake for details
|
|
@@ -19,7 +22,7 @@ set(KIT_SRCS
|
|
|
ctkTestWrappedSlot.h
|
|
|
)
|
|
|
|
|
|
-if(CTK_LIB_Scripting/Python/Core_PYTHONQT_USE_VTK)
|
|
|
+if(CTK_LIB_Scripting/Python/Core AND CTK_LIB_Scripting/Python/Core_PYTHONQT_USE_VTK)
|
|
|
list(APPEND KIT_SRCS
|
|
|
ctkTestWrappedQListOfVTKObject.h
|
|
|
ctkTestWrappedVTKObserver.h
|
|
@@ -37,7 +40,7 @@ set(KIT_MOC_SRCS
|
|
|
ctkTestWrappedSlot.h
|
|
|
)
|
|
|
|
|
|
-if(CTK_LIB_Scripting/Python/Core_PYTHONQT_USE_VTK)
|
|
|
+if(CTK_LIB_Scripting/Python/Core AND CTK_LIB_Scripting/Python/Core_PYTHONQT_USE_VTK)
|
|
|
list(APPEND KIT_MOC_SRCS
|
|
|
ctkTestWrappedQListOfVTKObject.h
|
|
|
ctkTestWrappedVTKObserver.h
|
|
@@ -48,22 +51,36 @@ endif()
|
|
|
|
|
|
# UI files
|
|
|
set(KIT_UI_FORMS
|
|
|
-)
|
|
|
+ )
|
|
|
|
|
|
# Resources
|
|
|
set(KIT_resources
|
|
|
-)
|
|
|
+ )
|
|
|
+
|
|
|
+set(KIT_INCLUDE_DIRECTORIES
|
|
|
+ )
|
|
|
|
|
|
-# Set VTK_LIBRARIES variable
|
|
|
set(VTK_LIBRARIES
|
|
|
- vtkCommon
|
|
|
- vtkFiltering
|
|
|
)
|
|
|
|
|
|
+if(CTK_LIB_Scripting/Python/Core AND CTK_LIB_Scripting/Python/Core_PYTHONQT_USE_VTK)
|
|
|
+ list(APPEND KIT_INCLUDE_DIRECTORIES
|
|
|
+ ${CTKVisualizationVTKCore_BINARY_DIR}
|
|
|
+ ${CTKVisualizationVTKCore_SOURCE_DIR}
|
|
|
+ )
|
|
|
+endif()
|
|
|
+
|
|
|
# Target libraries - See CMake/ctkFunctionGetTargetLibraries.cmake
|
|
|
# The following macro will read the target libraries from the file 'target_libraries.cmake'
|
|
|
ctkFunctionGetTargetLibraries(KIT_target_libraries)
|
|
|
|
|
|
+if(CTK_LIB_Scripting/Python/Core AND CTK_LIB_Scripting/Python/Core_PYTHONQT_USE_VTK)
|
|
|
+ list(APPEND KIT_target_libraries
|
|
|
+ CTKVisualizationVTKCore
|
|
|
+ vtkFiltering
|
|
|
+ )
|
|
|
+endif()
|
|
|
+
|
|
|
# Configure file will be configured using CTK_WRAP_PYTHONQT_{LIGHT, FULL} and
|
|
|
# CTK_BUILD_SHARED_LIBS variables
|
|
|
configure_file(
|
|
@@ -123,6 +140,7 @@ ctkMacroBuildApp(
|
|
|
SRCS ${KIT_SRCS}
|
|
|
MOC_SRCS ${KIT_MOC_SRCS}
|
|
|
UI_FORMS ${KIT_UI_FORMS}
|
|
|
+ INCLUDE_DIRECTORIES ${KIT_INCLUDE_DIRECTORIES}
|
|
|
TARGET_LIBRARIES ${KIT_target_libraries}
|
|
|
RESOURCES ${KIT_resources}
|
|
|
)
|