CMakeLists.txt 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. PROJECT(org_commontk_slicermodule)
  2. SET(PLUGIN_export_directive "org_commontk_slicermodule_EXPORT")
  3. SET(PLUGIN_SRCS
  4. ctkSlicerModulePlugin.cpp
  5. ctkSlicerModuleReader.h
  6. ctkSlicerModuleReader.cxx
  7. ctkSlicerModuleStringConverter.h
  8. ctkSlicerModuleStringConverter.cpp
  9. )
  10. # Files which should be processed by Qts moc
  11. SET(PLUGIN_MOC_SRCS
  12. ctkSlicerModulePlugin_p.h
  13. ctkSlicerModuleReader.h
  14. ctkSlicerModuleStringConverter.h
  15. )
  16. # Qt Designer files which should be processed by Qts uic
  17. SET(PLUGIN_UI_FORMS
  18. )
  19. # QRC Files which should be compiled into the plugin
  20. SET(PLUGIN_resources
  21. )
  22. # Update CTK_BASE_LIBRARIES with QT libraries
  23. IF(QT4_FOUND)
  24. SET(CTK_BASE_LIBRARIES ${CTK_BASE_LIBRARIES} ${QT_LIBRARIES} CACHE INTERNAL "CTK base libraries" FORCE)
  25. ENDIF()
  26. #Compute the plugin dependencies
  27. ctkMacroGetTargetLibraries(PLUGIN_target_libraries)
  28. ctkMacroBuildPlugin(
  29. NAME ${PROJECT_NAME}
  30. EXPORT_DIRECTIVE ${PLUGIN_export_directive}
  31. SRCS ${PLUGIN_SRCS}
  32. MOC_SRCS ${PLUGIN_MOC_SRCS}
  33. UI_FORMS ${PLUGIN_UI_FORMS}
  34. RESOURCES ${PLUGIN_resources}
  35. TARGET_LIBRARIES ${PLUGIN_target_libraries}
  36. )
  37. SET( QT_USE_QTXML ON )
  38. INCLUDE(${QT_USE_FILE})
  39. TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${QT_LIBRARIES})
  40. # Testing
  41. IF(BUILD_TESTING)
  42. ADD_SUBDIRECTORY(Testing)
  43. ENDIF(BUILD_TESTING)