CMakeLists.txt 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. PROJECT(CTKCore)
  2. #
  3. # 3rd party dependencies
  4. #
  5. # use the QtMobility SuperBuild paths for now
  6. # we should add a FindQtMobility later
  7. SET(QTMOBILITY_INCLUDE_DIRS
  8. "${CTK_BINARY_DIR}/../CMakeExternals/Source/QtMobility/install/include"
  9. )
  10. SET(QTMOBILITY_LIBRARY_DIR "${LIBRARY_OUTPUT_PATH}")
  11. FIND_LIBRARY(QTMOBILITY_QTSERVICEFW_LIBRARY_DEBUG QtServiceFrameworkd
  12. PATHS ${QTMOBILITY_LIBRARY_DIR}
  13. )
  14. FIND_LIBRARY(QTMOBILITY_QTSERVICEFW_LIBRARY_RELEASE QtServiceFramework
  15. PATHS ${QTMOBILITY_LIBRARY_DIR}
  16. )
  17. SET(QTMOBILITY_QTSERVICEFW_LIBRARIES )
  18. IF(QTMOBILITY_QTSERVICEFW_LIBRARY_RELEASE)
  19. LIST(APPEND QTMOBILITY_QTSERVICEFW_LIBRARIES optimized ${QTMOBILITY_QTSERVICEFW_LIBRARY_RELEASE})
  20. ENDIF()
  21. IF(QTMOBILITY_QTSERVICEFW_LIBRARY_DEBUG)
  22. LIST(APPEND QTMOBILITY_QTSERVICEFW_LIBRARIES debug ${QTMOBILITY_QTSERVICEFW_LIBRARY_DEBUG})
  23. ENDIF()
  24. #
  25. # See CTK/CMake/ctkMacroBuildQtLib.cmake for details
  26. #
  27. SET(KIT_export_directive "CTK_CORE_EXPORT")
  28. # Additional directories to include
  29. SET(KIT_include_directories
  30. ${QTMOBILITY_INCLUDE_DIRS}
  31. )
  32. # Source files
  33. SET(KIT_SRCS
  34. ctkModelTester.cxx
  35. ctkModelTester.h
  36. ctkUtils.cxx
  37. ctkUtils.h
  38. # PluginFramework sources
  39. PluginFramework/ctkLDAPSearchFilter.cxx
  40. PluginFramework/ctkPlugin.cxx
  41. PluginFramework/ctkPluginContext.cxx
  42. PluginFramework/ctkPluginManager.cxx
  43. PluginFramework/ctkPluginRepository.cxx
  44. PluginFramework/ctkServiceReference.cxx
  45. PluginFramework/ctkServiceRegistration.cxx
  46. #PluginFramework/ctkServiceRegistry.cxx
  47. PluginFramework/ctkVersion.cxx
  48. # EventBus sources
  49. EventBus/ctkEvent.cxx
  50. EventBus/ctkEventConstants.cxx
  51. )
  52. # Headers that should run through moc
  53. SET(KIT_MOC_SRCS
  54. ctkModelTester.h
  55. # PluginFramework headers
  56. PluginFramework/ctkPluginActivator.h
  57. )
  58. # UI files
  59. SET(KIT_UI_FORMS
  60. )
  61. # Resources
  62. SET(KIT_resources
  63. )
  64. # Target libraries - See CMake/ctkMacroGetTargetLibraries.cmake
  65. # The following macro will read the target libraries from the file 'target_libraries.cmake'
  66. ctkMacroGetTargetLibraries(KIT_target_libraries)
  67. ctkMacroBuildQtLib(
  68. NAME ${PROJECT_NAME}
  69. EXPORT_DIRECTIVE ${KIT_export_directive}
  70. INCLUDE_DIRECTORIES ${KIT_include_directories}
  71. SRCS ${KIT_SRCS}
  72. MOC_SRCS ${KIT_MOC_SRCS}
  73. UI_FORMS ${KIT_UI_FORMS}
  74. TARGET_LIBRARIES ${KIT_target_libraries}
  75. RESOURCES ${KIT_resources}
  76. LIBRARY_TYPE ${CTK_LIBRARY_MODE}
  77. )
  78. # Plugins
  79. #ADD_SUBDIRECTORY(Plugins)
  80. # Testing
  81. IF(BUILD_TESTING)
  82. ADD_SUBDIRECTORY(Testing)
  83. ENDIF(BUILD_TESTING)