Fixing the PackageMaker generator

This commit is contained in:
Mathieu Malaterre 2012-01-11 16:18:26 +00:00
parent 8d18c77a7d
commit 32e80bc4a7
1 changed files with 9 additions and 4 deletions

View File

@ -13,9 +13,13 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
set(OPJ_PACKAGE_CONTACT "openjpeg users <openjpeg@googlegroups.com>") set(OPJ_PACKAGE_CONTACT "openjpeg users <openjpeg@googlegroups.com>")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${OPJ_PACKAGE_DESCRIPTION_SUMMARY}) set(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${OPJ_PACKAGE_DESCRIPTION_SUMMARY})
set(CPACK_PACKAGE_VENDOR "OpenJPEG") set(CPACK_PACKAGE_VENDOR "OpenJPEG Team")
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") #set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") configure_file("${CMAKE_CURRENT_SOURCE_DIR}/LICENSE"
"${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt" COPYONLY
)
# For PackageMaker on MacOSX it is important to have a file extension:
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt")
set(CPACK_PACKAGE_VERSION_MAJOR "${OPENJPEG_VERSION_MAJOR}") set(CPACK_PACKAGE_VERSION_MAJOR "${OPENJPEG_VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${OPENJPEG_VERSION_MINOR}") set(CPACK_PACKAGE_VERSION_MINOR "${OPENJPEG_VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${OPENJPEG_VERSION_BUILD}") set(CPACK_PACKAGE_VERSION_PATCH "${OPENJPEG_VERSION_BUILD}")
@ -23,11 +27,12 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
set(CPACK_SOURCE_PACKAGE_FILE_NAME "openjpeg-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") set(CPACK_SOURCE_PACKAGE_FILE_NAME "openjpeg-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
set(CPACK_BUNDLE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/CMake/opj_logo.icns") set(CPACK_BUNDLE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/CMake/opj_logo.icns")
set(CPACK_BUNDLE_NAME "BundleGeneratorTest") set(CPACK_BUNDLE_NAME "OpenJPEG ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}")
configure_file(${CMAKE_ROOT}/Templates/AppleInfo.plist configure_file(${CMAKE_ROOT}/Templates/AppleInfo.plist
${CMAKE_CURRENT_BINARY_DIR}/opj.plist) ${CMAKE_CURRENT_BINARY_DIR}/opj.plist)
SET(CPACK_BUNDLE_PLIST SET(CPACK_BUNDLE_PLIST
${CMAKE_CURRENT_BINARY_DIR}/opj.plist) ${CMAKE_CURRENT_BINARY_DIR}/opj.plist)
#include(BundleUtilities)
include(CPack) include(CPack)
endiF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") endiF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")