CMakeLists.txt 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. PROJECT(CTKPluginFramework)
  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 "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
  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 AND QTMOBILITY_QTSERVICEFW_LIBRARY_DEBUG)
  19. SET(QTMOBILITY_QTSERVICEFW_LIBRARIES optimized ${QTMOBILITY_QTSERVICEFW_LIBRARY_RELEASE} debug ${QTMOBILITY_QTSERVICEFW_LIBRARY_DEBUG})
  20. ELSEIF(QTMOBILITY_QTSERVICEFW_LIBRARY_DEBUG)
  21. SET(QTMOBILITY_QTSERVICEFW_LIBRARIES ${QTMOBILITY_QTSERVICEFW_LIBRARY_DEBUG})
  22. ELSEIF(QTMOBILITY_QTSERVICEFW_LIBRARY_RELEASE)
  23. SET(QTMOBILITY_QTSERVICEFW_LIBRARIES ${QTMOBILITY_QTSERVICEFW_LIBRARY_RELEASE})
  24. ENDIF()
  25. #
  26. # See CTK/CMake/ctkMacroBuildLib.cmake for details
  27. #
  28. SET(KIT_export_directive "CTK_PLUGINFW_EXPORT")
  29. # Additional directories to include
  30. SET(KIT_include_directories
  31. ${QTMOBILITY_INCLUDE_DIRS}
  32. )
  33. # Source files
  34. SET(KIT_SRCS
  35. ctkLDAPSearchFilter.cxx
  36. ctkPlugin.cxx
  37. ctkPluginArchive.cxx
  38. ctkPluginConstants.cxx
  39. ctkPluginContext.cxx
  40. ctkPluginDatabase.cxx
  41. ctkPluginDatabaseException.cxx
  42. ctkPluginEvent.cxx
  43. ctkPluginException.cxx
  44. ctkPluginFramework.cxx
  45. ctkPluginFrameworkContext.cxx
  46. ctkPluginFrameworkContextPrivate.cxx
  47. ctkPluginFrameworkPrivate.cxx
  48. ctkPluginManager.cxx
  49. ctkPluginManifest.cxx
  50. ctkPluginPrivate.cxx
  51. ctkPlugins.cxx
  52. ctkServiceReference.cxx
  53. ctkServiceRegistration.cxx
  54. #PluginFramework/ctkServiceRegistry.cxx
  55. ctkPluginStorage.cxx
  56. ctkVersion.cxx
  57. ctkVersionRange.cxx
  58. # EventBus sources
  59. EventBus/ctkEvent.cxx
  60. EventBus/ctkEventConstants.cxx
  61. )
  62. # Headers that should run through moc
  63. SET(KIT_MOC_SRCS
  64. ctkPluginContext.h
  65. ctkPluginEvent.h
  66. )
  67. # UI files
  68. SET(KIT_UI_FORMS
  69. )
  70. # Resources
  71. SET(KIT_resources
  72. )
  73. # Create a MANIFEST.MF resource for the PluginFramework library,
  74. # pretending that is is a plugin (the system plugin)
  75. ctkMacroGeneratePluginManifest(KIT_SRCS
  76. SYMBOLIC_NAME "system.plugin"
  77. VERSION "0.9.9"
  78. )
  79. # Target libraries - See CMake/ctkMacroGetTargetLibraries.cmake
  80. # The following macro will read the target libraries from the file 'target_libraries.cmake'
  81. ctkMacroGetTargetLibraries(KIT_target_libraries)
  82. ctkMacroBuildLib(
  83. NAME ${PROJECT_NAME}
  84. EXPORT_DIRECTIVE ${KIT_export_directive}
  85. INCLUDE_DIRECTORIES ${KIT_include_directories}
  86. SRCS ${KIT_SRCS}
  87. MOC_SRCS ${KIT_MOC_SRCS}
  88. UI_FORMS ${KIT_UI_FORMS}
  89. TARGET_LIBRARIES ${KIT_target_libraries}
  90. RESOURCES ${KIT_resources}
  91. LIBRARY_TYPE ${CTK_LIBRARY_MODE}
  92. )
  93. # Testing
  94. #IF(BUILD_TESTING)
  95. # ADD_SUBDIRECTORY(Testing)
  96. #ENDIF(BUILD_TESTING)