CMakeLists.txt 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. project(CTKScriptingPythonWidgets)
  2. #
  3. # 3rd party dependencies
  4. #
  5. if(CTK_LIB_Scripting/Python/Core_PYTHONQT_USE_VTK)
  6. include(${VTK_USE_FILE})
  7. endif()
  8. #
  9. # See CTK/CMake/ctkMacroBuildLib.cmake for details
  10. #
  11. set(KIT_export_directive "CTK_SCRIPTING_PYTHON_WIDGETS_EXPORT")
  12. # Source files
  13. set(KIT_SRCS
  14. ctkPythonConsole.cpp
  15. ctkPythonConsole.h
  16. )
  17. # Headers that should run through moc
  18. set(KIT_MOC_SRCS
  19. ctkPythonConsole.h
  20. )
  21. # UI files
  22. set(KIT_UI_FORMS
  23. )
  24. # Resources
  25. set(KIT_resources
  26. Resources/ctkScriptingPythonWidgets.qrc
  27. )
  28. # Target libraries - See CMake/ctkFunctionGetTargetLibraries.cmake
  29. # The following macro will read the target libraries from the file 'target_libraries.cmake'
  30. ctkFunctionGetTargetLibraries(KIT_target_libraries)
  31. ctkMacroBuildLib(
  32. NAME ${PROJECT_NAME}
  33. EXPORT_DIRECTIVE ${KIT_export_directive}
  34. SRCS ${KIT_SRCS}
  35. MOC_SRCS ${KIT_MOC_SRCS}
  36. UI_FORMS ${KIT_UI_FORMS}
  37. TARGET_LIBRARIES ${KIT_target_libraries}
  38. RESOURCES ${KIT_resources}
  39. LIBRARY_TYPE ${CTK_LIBRARY_MODE}
  40. )
  41. if(CTK_WRAP_PYTHONQT_FULL OR CTK_WRAP_PYTHONQT_LIGHT)
  42. ctkMacroBuildLibWrapper(
  43. TARGET ${PROJECT_NAME}
  44. SRCS ${KIT_SRCS}
  45. WRAPPER_LIBRARY_TYPE ${CTK_LIBRARY_MODE}
  46. )
  47. endif()
  48. # Plugins
  49. if(CTK_BUILD_QTDESIGNER_PLUGINS)
  50. add_subdirectory(Plugins)
  51. endif()
  52. # Testing
  53. if(BUILD_TESTING)
  54. add_subdirectory(Testing)
  55. endif()