CTKGenerateCTKConfig.cmake 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #
  2. # Generate the CTKConfig.cmake file in the build tree. Also configure
  3. # one for installation. The file tells external projects how to use CTK.
  4. #
  5. # Construct version numbers for CTKConfigVersion.cmake.
  6. SET(_CTK_VERSION_MAJOR ${CTK_MAJOR_VERSION})
  7. SET(_CTK_VERSION_MINOR ${CTK_MINOR_VERSION})
  8. SET(_CTK_VERSION_PATCH ${CTK_BUILD_VERSION})
  9. # We use odd minor numbers for development versions.
  10. # Use a date for the development patch level.
  11. # IF("${_CTK_VERSION_MINOR}" MATCHES "[13579]$")
  12. # INCLUDE(${CTK_SOURCE_DIR}/Utilities/kwsys/kwsysDateStamp.cmake)
  13. # SET(_CTK_VERSION_PATCH
  14. # "${KWSYS_DATE_STAMP_YEAR}${KWSYS_DATE_STAMP_MONTH}${KWSYS_DATE_STAMP_DAY}"
  15. # )
  16. # ENDIF()
  17. #-----------------------------------------------------------------------------
  18. # Settings shared between the build tree and install tree.
  19. #-----------------------------------------------------------------------------
  20. # Settings specific to the build tree.
  21. # The install-only section is empty for the build tree.
  22. SET(CTK_CONFIG_INSTALL_ONLY)
  23. # The "use" file.
  24. SET(CTK_USE_FILE ${CTK_SUPERBUILD_BINARY_DIR}/UseCTK.cmake)
  25. # Library directory.
  26. SET(CTK_LIBRARY_DIRS_CONFIG ${LIBRARY_OUTPUT_PATH})
  27. # Runtime library directory.
  28. SET(CTK_RUNTIME_LIBRARY_DIRS_CONFIG ${LIBRARY_OUTPUT_PATH})
  29. # Binary executable directory.
  30. SET(CTK_EXECUTABLE_DIRS_CONFIG ${EXECUTABLE_OUTPUT_PATH})
  31. # QtDesigner plugins directory
  32. SET(CTK_QTDESIGNERPLUGINS_DIR_CONFIG ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
  33. # Determine the include directories needed.
  34. SET(CTK_INCLUDE_DIRS_CONFIG
  35. ${CTK_BASE_INCLUDE_DIRS}
  36. )
  37. # Executable locations.
  38. # CMake extension module directory.
  39. SET(CTK_CMAKE_DIR_CONFIG "${CTK_CMAKE_DIR}")
  40. SET(CTK_CMAKE_UTILITIES_DIR_CONFIG "${CTK_CMAKE_UTILITIES_DIR}")
  41. # Build configuration information.
  42. SET(CTK_CONFIGURATION_TYPES_CONFIG ${CMAKE_CONFIGURATION_TYPES})
  43. SET(CTK_BUILD_TYPE_CONFIG ${CMAKE_BUILD_TYPE})
  44. #-----------------------------------------------------------------------------
  45. # Configure CTKConfig.cmake for the build tree.
  46. CONFIGURE_FILE(${CTK_SOURCE_DIR}/CTKConfig.cmake.in
  47. ${CTK_SUPERBUILD_BINARY_DIR}/CTKConfig.cmake @ONLY IMMEDIATE)
  48. CONFIGURE_FILE(${CTK_SOURCE_DIR}/CTKConfigVersion.cmake.in
  49. ${CTK_SUPERBUILD_BINARY_DIR}/CTKConfigVersion.cmake @ONLY IMMEDIATE)
  50. #-----------------------------------------------------------------------------
  51. # Settings specific to the install tree.
  52. #-----------------------------------------------------------------------------
  53. # Configure CTKConfig.cmake for the install tree.