CTKConfig.cmake.in 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. #
  2. # CTKConfig.cmake - CTK CMake configuration file for external projects.
  3. #
  4. # This file is configured by CTK and used by the UseCTK.cmake module
  5. # to load CTK's settings for an external project.
  6. @PACKAGE_INIT@
  7. # CMake extension module directory
  8. set_and_check(CTK_CMAKE_DIR "@PACKAGE_CTK_CMAKE_DIR_CONFIG@")
  9. set_and_check(CTK_CMAKE_UTILITIES_DIR "@PACKAGE_CTK_CMAKE_UTILITIES_DIR_CONFIG@")
  10. # The location of the UseCTK.cmake file.
  11. set_and_check(CTK_USE_FILE "@PACKAGE_CTK_CONFIG_DIR_CONFIG@/UseCTK.cmake")
  12. # Include CTK Plugin specific variables
  13. set_and_check(CTK_PLUGIN_USE_FILE "@PACKAGE_CTK_CONFIG_DIR_CONFIG@/CTKPluginUseFile.cmake")
  14. set_and_check(CTK_TARGETS "@PACKAGE_CTK_CONFIG_DIR_CONFIG@/CTKExports.cmake")
  15. # Directory containing the ctkConfig.h file
  16. set_and_check(CTK_CONFIG_H_INCLUDE_DIR "@PACKAGE_CTK_CONFIG_H_INCLUDE_DIR_CONFIG@")
  17. # Set the header template which defines custom export/import macros
  18. # for shared libraries
  19. set_and_check(CTK_EXPORT_HEADER_TEMPLATE "@PACKAGE_CTK_EXPORT_HEADER_TEMPLATE_DIR_CONFIG@/ctkExport.h.in")
  20. # Set CTK library directory
  21. set_and_check(CTK_LIBRARY_DIR "@PACKAGE_CTK_LIBRARY_DIR_CONFIG@")
  22. set(CTK_LIBRARY_DIRS ${CTK_LIBRARY_DIR})
  23. # Import CTK targets
  24. if(NOT TARGET CTKCore)
  25. include(${CTK_TARGETS})
  26. endif()
  27. @CTK_CONFIG_CODE@
  28. # Include CTK macros
  29. include("${CTK_CMAKE_DIR}/ctkFunctionGetGccVersion.cmake")
  30. include("${CTK_CMAKE_DIR}/ctkFunctionCheckCompilerFlags.cmake")
  31. include("${CTK_CMAKE_DIR}/ctkFunctionGetCompilerVisibilityFlags.cmake")
  32. include("${CTK_CMAKE_DIR}/ctkMacroParseArguments.cmake")
  33. include("${CTK_CMAKE_DIR}/ctkMacroSetPaths.cmake")
  34. include("${CTK_CMAKE_DIR}/ctkMacroListFilter.cmake")
  35. include("${CTK_CMAKE_DIR}/ctkMacroBuildLibWrapper.cmake")
  36. include("${CTK_CMAKE_DIR}/ctkMacroBuildPlugin.cmake")
  37. include("${CTK_CMAKE_DIR}/ctkMacroBuildQtPlugin.cmake")
  38. include("${CTK_CMAKE_DIR}/ctkMacroTargetLibraries.cmake") # Import multiple macros
  39. include("${CTK_CMAKE_DIR}/ctkFunctionExtractOptionNameAndValue.cmake")
  40. include("${CTK_CMAKE_DIR}/ctkMacroValidateBuildOptions.cmake")
  41. include("${CTK_CMAKE_DIR}/ctkFunctionGenerateDGraphInput.cmake")
  42. include("${CTK_CMAKE_DIR}/ctkFunctionGeneratePluginManifest.cmake")
  43. include("${CTK_CMAKE_DIR}/ctkFunctionGeneratePluginUseFile.cmake")
  44. include("${CTK_CMAKE_DIR}/ctkMacroGeneratePluginResourceFile.cmake")
  45. include("${CTK_CMAKE_DIR}/ctkFunctionGetIncludeDirs.cmake")
  46. include("${CTK_CMAKE_DIR}/ctkFunctionGetLibraryDirs.cmake")
  47. include("${CTK_CMAKE_DIR}/ctkFunctionExtractPluginTargets.cmake")
  48. include("${CTK_CMAKE_DIR}/ctkFunctionGetAllPluginTargets.cmake")
  49. include("${CTK_CMAKE_DIR}/ctkFunctionGetTargetDependencies.cmake")
  50. include("${CTK_CMAKE_DIR}/ctkFunctionGetPluginDependencies.cmake")
  51. include("${CTK_CMAKE_DIR}/ctkMacroSetupPlugins.cmake")
  52. include("${CTK_CMAKE_DIR}/ctkMacroGenerateMocs.cmake")
  53. # List all libraries
  54. SET(CTK_LIBRARIES @CTK_LIBRARIES@)
  55. # List all CTK libraries wrapped with PythonQt
  56. SET(CTK_WRAPPED_LIBRARIES_PYTHONQT @CTK_WRAPPED_LIBRARIES_PYTHONQT@)
  57. # Include CTK Plugin specific variables
  58. include(${CTK_PLUGIN_USE_FILE})
  59. # CTK external projects variables
  60. @CTK_SUPERBUILD_EP_VARS_CONFIG@
  61. # Qt configuration
  62. set(CTK_QT_VERSION "@CTK_QT_VERSION@")
  63. set(CTK_QT5_COMPONENTS @CTK_QT5_COMPONENTS@)
  64. # Update CMake module path so that calling "find_package(DCMTK)" works as expected
  65. # after calling "find_package(CTK)"
  66. # Ideally projects like DCMTK or PythonQt should provide both "Config" and "Use" files.
  67. set(CMAKE_MODULE_PATH
  68. ${CTK_CMAKE_UTILITIES_DIR}
  69. ${CMAKE_MODULE_PATH}
  70. )
  71. # Relative install paths
  72. set(CTK_INSTALL_BIN_DIR "@CTK_INSTALL_BIN_DIR@")
  73. set(CTK_INSTALL_INCLUDE_DIR "@CTK_INSTALL_INCLUDE_DIR@")
  74. set(CTK_INSTALL_LIB_DIR "@CTK_INSTALL_LIB_DIR@")
  75. set(CTK_INSTALL_PLUGIN_INCLUDE_DIR "@CTK_INSTALL_PLUGIN_INCLUDE_DIR@")
  76. set(CTK_INSTALL_PLUGIN_DIR "@CTK_INSTALL_PLUGIN_DIR@")
  77. set(CTK_INSTALL_QTPLUGIN_DIR "@CTK_INSTALL_QTPLUGIN_DIR@")
  78. # A CTK install tree always provides one build configuration. A CTK
  79. # build tree may provide either one or multiple build configurations
  80. # depending on the CMake generator used. Since CTK can be used either
  81. # from a build tree or an install tree it is useful for outside
  82. # projects to know the configurations available. If this
  83. # CTKConfig.cmake is in a CTK install tree CTK_CONFIGURATION_TYPES
  84. # will be empty and CTK_BUILD_TYPE will be set to the value of
  85. # CMAKE_BUILD_TYPE used to build CTK. If CTKConfig.cmake is in a CTK
  86. # build tree then CTK_CONFIGURATION_TYPES and CTK_BUILD_TYPE will have
  87. # values matching CMAKE_CONFIGURATION_TYPES and CMAKE_BUILD_TYPE for
  88. # that build tree (only one will ever be set).
  89. SET(CTK_CONFIGURATION_TYPES @CTK_CONFIGURATION_TYPES_CONFIG@)
  90. SET(CTK_BUILD_TYPE @CTK_BUILD_TYPE_CONFIG@)