CMakeLists.txt 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. project(CTKScriptingPythonCore)
  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_CORE_EXPORT")
  12. # Source files
  13. set(KIT_SRCS
  14. ctkAbstractPythonManager.cpp
  15. ctkAbstractPythonManager.h
  16. )
  17. # Headers that should run through moc
  18. set(KIT_MOC_SRCS
  19. ctkAbstractPythonManager.h
  20. )
  21. # UI files
  22. set(KIT_UI_FORMS
  23. )
  24. # Resources
  25. set(KIT_resources
  26. )
  27. #
  28. # Configure file describing which Qt modules are wrapped
  29. #
  30. foreach(qtlib CORE GUI NETWORK OPENGL SQL SVG UITOOLS WEBKIT XML XMLPATTERNS)
  31. set(CTK_PYTHONQT_WRAP_QT${qtlib} ${CTK_LIB_Scripting/Python/Core_PYTHONQT_WRAP_QT${qtlib}})
  32. #message(CTK_LIB_Scripting/Python/Core_PYTHONQT_WRAP_QT${qtlib}:${CTK_LIB_Scripting/Python/Core_PYTHONQT_WRAP_QT${qtlib}})
  33. endforeach()
  34. configure_file(
  35. ctkScriptingPythonCoreConfigure.h.in
  36. ${CMAKE_CURRENT_BINARY_DIR}/ctkScriptingPythonCoreConfigure.h
  37. )
  38. # Target libraries - See CMake/ctkFunctionGetTargetLibraries.cmake
  39. # The following macro will read the target libraries from the file 'target_libraries.cmake'
  40. ctkFunctionGetTargetLibraries(KIT_target_libraries)
  41. # Link against vtkPython if required
  42. if(CTK_LIB_Scripting/Python/Core_PYTHONQT_USE_VTK)
  43. list(APPEND KIT_target_libraries vtkPythonCore)
  44. endif()
  45. ctkMacroBuildLib(
  46. NAME ${PROJECT_NAME}
  47. EXPORT_DIRECTIVE ${KIT_export_directive}
  48. SRCS ${KIT_SRCS}
  49. MOC_SRCS ${KIT_MOC_SRCS}
  50. UI_FORMS ${KIT_UI_FORMS}
  51. TARGET_LIBRARIES ${KIT_target_libraries}
  52. RESOURCES ${KIT_resources}
  53. LIBRARY_TYPE ${CTK_LIBRARY_MODE}
  54. )
  55. # Plugins
  56. #if(CTK_BUILD_QTDESIGNER_PLUGINS)
  57. # add_subdirectory(Plugins)
  58. #endif()
  59. add_subdirectory(Python)
  60. # Testing
  61. if(BUILD_TESTING)
  62. add_subdirectory(Testing)
  63. endif()