From df49f543417ba7b3e26406e1152fde4be8a15379 Mon Sep 17 00:00:00 2001 From: Marcelo Lira Date: Wed, 19 Aug 2009 12:34:53 -0300 Subject: Adding 'make dist' with git-archive --- CMakeLists.txt | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 62a9fee54..2bf6e740a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,10 +45,17 @@ add_subdirectory(libshiboken) add_subdirectory(tests) # "make dist", in fact "make package_source" -set(CPACK_SOURCE_PACKAGE_FILE_NAME "shiboken-${shiboken_VERSION}") -set(CPACK_SOURCE_GENERATOR TGZ) -set(CPACK_SOURCE_IGNORE_FILES "~$" ".svn" "debian/" "build/" ".swp$" "*.kdev4") -include(CPack) +#set(CPACK_SOURCE_PACKAGE_FILE_NAME "shiboken-${shiboken_VERSION}") +#set(CPACK_SOURCE_GENERATOR TGZ) +#set(CPACK_SOURCE_IGNORE_FILES "~$" ".svn" "debian/" "build/" ".swp$" "*.kdev4") +#include(CPack) + +set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${shiboken_VERSION}) +add_custom_target(dist + COMMAND git archive --prefix=${ARCHIVE_NAME}/ HEAD + | bzip2 > ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz2 + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) + install(TARGETS shiboken DESTINATION bin) -- cgit v1.2.3