| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 | project(ctkSimplePythonShell)## 3rd party dependencies#include(${VTK_USE_FILE})## See CTK/CMake/ctkMacroBuildApp.cmake for details#set(KIT_SRCS  ${CMAKE_CURRENT_BINARY_DIR}/ctkSimplePythonManager.cpp  ctkSimplePythonManager.h  ctkSimplePythonQtDecorators.h  ctkSimplePythonShellMain.cpp  ctkTestWrappedQProperty.h  ctkTestWrappedQInvokable.h  ctkTestWrappedSlot.h)if(CTK_LIB_Scripting/Python/Core_PYTHONQT_USE_VTK)  list(APPEND KIT_SRCS    ctkTestWrappedQListOfVTKObject.h    ctkTestWrappedVTKSlot.h    ctkTestWrappedVTKQInvokable.h    )endif()# Headers that should run through mocset(KIT_MOC_SRCS  ctkSimplePythonManager.h  ctkSimplePythonQtDecorators.h  ctkTestWrappedQProperty.h  ctkTestWrappedQInvokable.h  ctkTestWrappedSlot.h  )if(CTK_LIB_Scripting/Python/Core_PYTHONQT_USE_VTK)  list(APPEND KIT_MOC_SRCS    ctkTestWrappedQListOfVTKObject.h    ctkTestWrappedVTKSlot.h    ctkTestWrappedVTKQInvokable.h    )endif()# UI filesset(KIT_UI_FORMS)# Resourcesset(KIT_resources)# Set VTK_LIBRARIES variableset(VTK_LIBRARIES  vtkCommon  vtkFiltering  )# Target libraries - See CMake/ctkFunctionGetTargetLibraries.cmake# The following macro will read the target libraries from the file 'target_libraries.cmake'ctkFunctionGetTargetLibraries(KIT_target_libraries)# Configure file will be configured using CTK_WRAP_PYTHONQT_{LIGHT, FULL} and# CTK_BUILD_SHARED_LIBS variablesconfigure_file(  ctkSimplePythonShellConfigure.h.in  ${CMAKE_CURRENT_BINARY_DIR}/ctkSimplePythonShellConfigure.h  )# 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))  # Update list of target libraries with the list of available PythonQt libraries  # and set variables holding list of pythonqt initialization method  set(CTK_PYTHONQT_INITIALIZATION_METHOD_DEFINITION)  set(CTK_PYTHONQT_INITIALIZATION_METHOD_CALL)  # 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()  if(CTK_LIB_DICOM/Core)    list(APPEND MY_CTK_WRAPPED_LIBRARIES_PYTHONQT CTKDICOMCore)  endif()  if(CTK_LIB_DICOM/Widgets)    list(APPEND MY_CTK_WRAPPED_LIBRARIES_PYTHONQT CTKDICOMWidgets)  endif()  foreach(lib_name ${MY_CTK_WRAPPED_LIBRARIES_PYTHONQT})    list(APPEND KIT_target_libraries ${lib_name}PythonQt)    set(CTK_PYTHONQT_INITIALIZATION_METHOD_DEFINITION      "${CTK_PYTHONQT_INITIALIZATION_METHOD_DEFINITION}extern \"C\"{ void init${lib_name}PythonQt(); }")    set(CTK_PYTHONQT_INITIALIZATION_METHOD_CALL      "${CTK_PYTHONQT_INITIALIZATION_METHOD_CALL}init${lib_name}PythonQt();")  endforeach()endif()configure_file(  ctkSimplePythonManager.cpp.in  ${CMAKE_CURRENT_BINARY_DIR}/ctkSimplePythonManager.cpp  )ctkMacroBuildApp(  NAME ${PROJECT_NAME}  SRCS ${KIT_SRCS}  MOC_SRCS ${KIT_MOC_SRCS}  UI_FORMS ${KIT_UI_FORMS}  TARGET_LIBRARIES ${KIT_target_libraries}  RESOURCES ${KIT_resources}  )add_subdirectory(Python)# Testingif(BUILD_TESTING)  add_subdirectory(Testing)endif()
 |