diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2006-02-28 19:18:13 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2006-02-28 19:18:13 (GMT) |
commit | b25820ebd4f69180815d8609789eb2d1c644898d (patch) | |
tree | 169509db0708fbe3b8dcac9a540e95ace0f818ce /Modules/CPack.cmake | |
parent | a87de1e1cd89176af00511145ee6f2203d0fb9be (diff) | |
download | CMake-b25820ebd4f69180815d8609789eb2d1c644898d.zip CMake-b25820ebd4f69180815d8609789eb2d1c644898d.tar.gz CMake-b25820ebd4f69180815d8609789eb2d1c644898d.tar.bz2 |
ENH: Add resource files for PackageMaker
Diffstat (limited to 'Modules/CPack.cmake')
-rw-r--r-- | Modules/CPack.cmake | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake index 9b3689d..41113d3 100644 --- a/Modules/CPack.cmake +++ b/Modules/CPack.cmake @@ -21,8 +21,15 @@ cpack_set_if_not_set(CPACK_PACKAGE_VERSION cpack_set_if_not_set(CPACK_PACKAGE_VENDOR "Humanity") cpack_set_if_not_set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_NAME} built using CMake") + cpack_set_if_not_set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_ROOT}/Templates/CPack.GenericDescription.txt") +cpack_set_if_not_set(CPACK_RESOURCE_FILE_LICENSE + "${CMAKE_ROOT}/Templates/CPack.GenericLicense.txt") +cpack_set_if_not_set(CPACK_RESOURCE_FILE_README + "${CMAKE_ROOT}/Templates/CPack.GenericDescription.txt") +cpack_set_if_not_set(CPACK_RESOURCE_FILE_WELCOME + "${CMAKE_ROOT}/Templates/CPack.GenericWelcome.txt") # <project>-<major>.<minor>.<patch>-<release>-<platform>.<pkgtype> cpack_set_if_not_set(CPACK_PACKAGE_FILE_NAME @@ -32,9 +39,15 @@ cpack_set_if_not_set(CPACK_PACKAGE_INSTALL_DIRECTORY cpack_set_if_not_set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION}") -IF(NOT EXISTS "${CPACK_PACKAGE_DESCRIPTION_FILE}") - MESSAGE(SEND_ERROR "CPack package description file: \"${CPACK_PACKAGE_DESCRIPTION_FILE}\" could not be found.") -ENDIF(NOT EXISTS "${CPACK_PACKAGE_DESCRIPTION_FILE}") +MACRO(cpack_check_file_exists file description) +IF(NOT EXISTS "${file}") + MESSAGE(SEND_ERROR "CPack ${description} file: \"${file}\" could not be found.") +ENDIF(NOT EXISTS "${file}") +ENDMACRO(cpack_check_file_exists) +cpack_check_file_exists("${CPACK_PACKAGE_DESCRIPTION_FILE}" "package description") +cpack_check_file_exists("${CPACK_RESOURCE_FILE_LICENSE}" "license resource") +cpack_check_file_exists("${CPACK_RESOURCE_FILE_README}" "readme resource") +cpack_check_file_exists("${CPACK_RESOURCE_FILE_WELCOME}" "welcome resource") # Pick a generator IF(NOT CPACK_GENERATOR) |