Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-03-21 19:42:21 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-03-21 19:42:21 +0300
commitf0d7fbc4b7fb9649b56e9ce67e3326f9f7e069da (patch)
tree15a8e4970d6dff7e6f72532728c7db4161e56791 /build_files/cmake/packaging.cmake
parent2513b194a219b87f4751a86b6b4b804de6c50f93 (diff)
CMake package_archive target to create a .zip/.tar.bz2 package on mac/unix,
to be used by buildbot.
Diffstat (limited to 'build_files/cmake/packaging.cmake')
-rw-r--r--build_files/cmake/packaging.cmake30
1 files changed, 29 insertions, 1 deletions
diff --git a/build_files/cmake/packaging.cmake b/build_files/cmake/packaging.cmake
index b21c13f80b4..ee07857db26 100644
--- a/build_files/cmake/packaging.cmake
+++ b/build_files/cmake/packaging.cmake
@@ -51,7 +51,35 @@ if(APPLE)
# Libraries are bundled directly
set(CPACK_COMPONENT_LIBRARIES_HIDDEN TRUE)
-endif(APPLE)
+endif()
set(CPACK_PACKAGE_EXECUTABLES "blender")
include(CPack)
+
+# Target for build_archive.py script, to automatically pass along
+# version, revision, platform, build directory
+macro(add_package_archive packagename extension)
+ set(build_archive python ${CMAKE_SOURCE_DIR}/build_files/package_spec/build_archive.py)
+ set(package_output ${CMAKE_BINARY_DIR}/release/${packagename}.${extension})
+
+ add_custom_target(package_archive DEPENDS ${package_output})
+
+ add_custom_command(
+ OUTPUT ${package_output}
+ COMMAND ${build_archive} ${packagename} ${extension} bin release
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
+endmacro()
+
+if(APPLE)
+ add_package_archive(
+ "blender-${BLENDER_VERSION}-r${BUILD_REV}-OSX-${CMAKE_OSX_ARCHITECTURES}"
+ "zip")
+elseif(UNIX)
+ # platform name could be tweaked, to include glibc, and ensure processor is correct (i386 vs i686)
+ string(TOLOWER ${CMAKE_SYSTEM_NAME} PACKAGE_SYSTEM_NAME)
+
+ add_package_archive(
+ "blender-${BLENDER_VERSION}-r${BUILD_REV}-${PACKAGE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}"
+ "tar.bz2")
+endif()
+