summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2009-08-19 12:34:53 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2009-08-19 12:34:53 -0300
commitdf49f543417ba7b3e26406e1152fde4be8a15379 (patch)
tree83994e86d7e778789830bcb94ca8a334e2f16a56
parent9a4681eb73caa553aac349457374ff513bd111b5 (diff)
Adding 'make dist' with git-archive
-rw-r--r--CMakeLists.txt15
1 files changed, 11 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 62a9fee5..2bf6e740 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)