CMakeLists.txt 1.2 KB

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