CMakeLists.txt 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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/ctkPluginContext.cxx
  40. PluginFramework/ctkPluginManager.cxx
  41. )
  42. # Headers that should run through moc
  43. SET(KIT_MOC_SRCS
  44. ctkModelTester.h
  45. # PluginFramework headers
  46. PluginFramework/ctkPluginActivator.h
  47. )
  48. # UI files
  49. SET(KIT_UI_FORMS
  50. )
  51. # Resources
  52. SET(KIT_resources
  53. )
  54. # Target libraries - See CMake/ctkMacroGetTargetLibraries.cmake
  55. # The following macro will read the target libraries from the file 'target_libraries.cmake'
  56. ctkMacroGetTargetLibraries(KIT_target_libraries)
  57. ctkMacroBuildQtLib(
  58. NAME ${PROJECT_NAME}
  59. EXPORT_DIRECTIVE ${KIT_export_directive}
  60. INCLUDE_DIRECTORIES ${KIT_include_directories}
  61. SRCS ${KIT_SRCS}
  62. MOC_SRCS ${KIT_MOC_SRCS}
  63. UI_FORMS ${KIT_UI_FORMS}
  64. TARGET_LIBRARIES ${KIT_target_libraries}
  65. RESOURCES ${KIT_resources}
  66. LIBRARY_TYPE ${CTK_LIBRARY_MODE}
  67. )
  68. # Plugins
  69. #ADD_SUBDIRECTORY(Plugins)
  70. # Testing
  71. IF(BUILD_TESTING)
  72. ADD_SUBDIRECTORY(Testing)
  73. ENDIF(BUILD_TESTING)