CMakeLists.txt 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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. ctkPluginException.cxx
  43. ctkPluginFramework.cxx
  44. ctkPluginFrameworkContext.cxx
  45. ctkPluginFrameworkContextPrivate.cxx
  46. ctkPluginFrameworkPrivate.cxx
  47. ctkPluginManager.cxx
  48. ctkPluginManifest.cxx
  49. ctkPluginPrivate.cxx
  50. ctkPlugins.cxx
  51. ctkServiceReference.cxx
  52. ctkServiceRegistration.cxx
  53. #PluginFramework/ctkServiceRegistry.cxx
  54. ctkPluginStorage.cxx
  55. ctkVersion.cxx
  56. ctkVersionRange.cxx
  57. # EventBus sources
  58. EventBus/ctkEvent.cxx
  59. EventBus/ctkEventConstants.cxx
  60. )
  61. # Headers that should run through moc
  62. SET(KIT_MOC_SRCS
  63. )
  64. # UI files
  65. SET(KIT_UI_FORMS
  66. )
  67. # Resources
  68. SET(KIT_resources
  69. )
  70. # Create a MANIFEST.MF resource for the PluginFramework library,
  71. # pretending that is is a plugin (the system plugin)
  72. ctkMacroGeneratePluginManifest(KIT_SRCS
  73. SYMBOLIC_NAME "system.plugin"
  74. VERSION "0.9.9"
  75. )
  76. # Target libraries - See CMake/ctkMacroGetTargetLibraries.cmake
  77. # The following macro will read the target libraries from the file 'target_libraries.cmake'
  78. ctkMacroGetTargetLibraries(KIT_target_libraries)
  79. ctkMacroBuildLib(
  80. NAME ${PROJECT_NAME}
  81. EXPORT_DIRECTIVE ${KIT_export_directive}
  82. INCLUDE_DIRECTORIES ${KIT_include_directories}
  83. SRCS ${KIT_SRCS}
  84. MOC_SRCS ${KIT_MOC_SRCS}
  85. UI_FORMS ${KIT_UI_FORMS}
  86. TARGET_LIBRARIES ${KIT_target_libraries}
  87. RESOURCES ${KIT_resources}
  88. LIBRARY_TYPE ${CTK_LIBRARY_MODE}
  89. )
  90. # Testing
  91. #IF(BUILD_TESTING)
  92. # ADD_SUBDIRECTORY(Testing)
  93. #ENDIF(BUILD_TESTING)