summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-03-29 09:24:55 (GMT)
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-03-29 09:24:55 (GMT)
commit199982db3a81e48c66cffc77d4dcfe0d3d8170b9 (patch)
tree37a27fa4960e90f50e3be4b20235bae911d6df7a
parent00f83e83b7880f0e19bad8e8b401b52401cb7640 (diff)
parent704b6197c1a3abc86514ec700a5a19d56d279c4e (diff)
downloadlibkolabxml-199982db3a81e48c66cffc77d4dcfe0d3d8170b9.tar.gz
Merge branch 'master' of ssh://git.kolabsys.com/git/libkolabxml
-rw-r--r--CMakeLists.txt40
1 files changed, 25 insertions, 15 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5445917..67fd918 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-project(libkolabxml)
+project(libkolabxml NONE)
cmake_minimum_required(VERSION 2.6)
@@ -21,6 +21,30 @@ set (KOLABXML_VERSION "${KOLABXML_VERSION_MAJOR}.${KOLABXML_VERSION_MINOR}.${KOL
set (KOLABXML_VERSION_STRING ${CMAKE_PROJECT_NAME}-${KOLABXML_VERSION})
set (KOLAB_FORMAT_VERSION "3.0dev1")
+#It's possible to make dist targets only using:
+#cmake -DDIST_ONLY=TRUE ..
+if (DIST_ONLY)
+ message("Building DIST targets only (make dist, make snapshot)")
+ #make dist requires a tag with ${ARCHIVE_NAME} (e.g. libkolabxml-0.2.0)
+ set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${KOLABXML_VERSION})
+ add_custom_target(dist
+ COMMAND git archive --prefix=${ARCHIVE_NAME}/ ${ARCHIVE_NAME}
+ | bzip2 > ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz2
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
+
+ #snapshot of current development version
+ set(SNAPSHOTARCHIVE_NAME "${CMAKE_PROJECT_NAME}-${KOLABXML_VERSION}-HEAD")
+ add_custom_target(snapshot
+ COMMAND git archive --prefix=${SNAPSHOTARCHIVE_NAME}/ HEAD
+ | bzip2 > ${CMAKE_BINARY_DIR}/${SNAPSHOTARCHIVE_NAME}.tar.bz2
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
+ return()
+endif()
+
+#C++ is required from here on
+enable_language(CXX)
+
+
configure_file(libkolabxml-version.h.cmake "${CMAKE_BINARY_DIR}/libkolabxml-version.h" @ONLY)
@@ -157,17 +181,3 @@ if (QT4_FOUND)
else()
message("Qt libraries have not been found, not building tests")
endif()
-
-#make dist requires a tag with ${ARCHIVE_NAME} (e.g. libkolabxml-0.2.0)
-set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${KOLABXML_VERSION})
-add_custom_target(dist
- COMMAND git archive --prefix=${ARCHIVE_NAME}/ ${ARCHIVE_NAME}
- | bzip2 > ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz2
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
-
-#snapshot of current development version
-set(SNAPSHOTARCHIVE_NAME "${CMAKE_PROJECT_NAME}-${KOLABXML_VERSION}-HEAD")
-add_custom_target(snapshot
- COMMAND git archive --prefix=${SNAPSHOTARCHIVE_NAME}/ HEAD
- | bzip2 > ${CMAKE_BINARY_DIR}/${SNAPSHOTARCHIVE_NAME}.tar.bz2
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})