From 52c08fa4d351e37506f164dde77486af69b752ce Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 15 Feb 2011 18:33:05 +0000 Subject: CPack packaging support from Dan Eicher, tested to build redhat RPM's, a Mac bundle also defined. --- build_files/cmake/packaging.cmake | 40 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 build_files/cmake/packaging.cmake (limited to 'build_files/cmake/packaging.cmake') diff --git a/build_files/cmake/packaging.cmake b/build_files/cmake/packaging.cmake new file mode 100644 index 00000000000..be2d4d76e90 --- /dev/null +++ b/build_files/cmake/packaging.cmake @@ -0,0 +1,40 @@ +set(PROJECT_DESCRIPTION "Blender is a very fast and versatile 3D modeller/renderer.") +set(PROJECT_COPYRIGHT "Copyright (C) 2001-2011 Blender Foundation") +set(PROJECT_CONTACT "foundation@blender.org") +set(PROJECT_VENDOR "Blender Foundation") +set(ORG_WEBSITE "www.blender.org") + +set(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}) +set(CPACK_PACKAGE_DESCRIPTION ${PROJECT_NAME_LONG}) +set(CPACK_PACKAGE_VENDOR ${PROJECT_VENDOR}) +set(CPACK_PACKAGE_CONTACT ${PROJECT_CONTACT}) +set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING") +set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") + +# Force Package Name +set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${BLENDER_VERSION}-r${BUILD_REV}-${CPACK_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}) + +# RPM packages +include(build_files/cmake/RpmBuild.cmake) +if(RPMBUILD_FOUND AND NOT WIN32) + set(CPACK_GENERATOR "RPM") + set(CPACK_SET_DESTDIR TRUE) + set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_DESCRIPTION}") +endif(RPMBUILD_FOUND AND NOT WIN32) + +# Mac Bundle +if(APPLE) + set(CPACK_GENERATOR "DragNDrop") + + #Libraries are bundled directly + set(CPACK_COMPONENT_LIBRARIES_HIDDEN TRUE) + + # Bundle Properties + set(MACOSX_BUNDLE_BUNDLE_NAME blender) + set(MACOSX_BUNDLE_BUNDLE_VERSION ${BLENDER_VERSION}) + set(MACOSX_BUNDLE_SHORT_VERSION_STRING ${BLENDER_VERSION}) + set(MACOSX_BUNDLE_LONG_VERSION_STRING "Version ${BLENDER_VERSION}-r${BUILD_REV}") +endif(APPLE) + +set(CPACK_PACKAGE_EXECUTABLES "blender") +include(CPack) -- cgit v1.2.3