From 99a3a54dd1836f62c82bf1083f98e51cda472c8e Mon Sep 17 00:00:00 2001 From: Lu Wang Date: Tue, 28 Aug 2012 01:24:01 +0800 Subject: [PATCH] add a 'dist' target for packaing --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2472991..8a2a250 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,11 @@ link_directories ( ${Boost_LIBRARY_DIRS} ) include_directories(src) set(PDF2HTMLEX_VERSION "0.1") +set(ARCHIVE_NAME pdf2htmlex-${PDF2HTMLEX_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}) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wunused-function") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")