From 76fd3bfdc74b462337e932458c3084d3decaf891 Mon Sep 17 00:00:00 2001 From: barate Date: Thu, 30 Sep 2010 07:55:17 +0000 Subject: [PATCH] Changed version number and use version number automatically in doc --- CMakeLists.txt | 17 +++++++++-------- doc/CMakeLists.txt | 7 +++---- doc/version.texi | 4 ---- doc/version.texi.in | 2 ++ 4 files changed, 14 insertions(+), 16 deletions(-) delete mode 100644 doc/version.texi create mode 100644 doc/version.texi.in diff --git a/CMakeLists.txt b/CMakeLists.txt index ed01c34..7d503e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,6 +52,15 @@ IF (BUILD_PYTHON_WRAPPING) FIND_PACKAGE(SWIG) ENDIF (BUILD_PYTHON_WRAPPING) +SET(CPACK_GENERATOR TGZ) +SET(CPACK_SOURCE_GENERATOR TGZ ZIP) +SET(CPACK_PACKAGE_VERSION_MAJOR 1) +SET(CPACK_PACKAGE_VERSION_MINOR 2) +SET(CPACK_PACKAGE_VERSION_PATCH 0rc1) +SET(CPACK_SOURCE_IGNORE_FILES /\\\\.;/CVS/;~) +SET(CPACK_SOURCE_PACKAGE_FILE_NAME + ${PROJECT_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}) + configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Batch_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/Batch_config.h) INCLUDE(Summary) @@ -64,14 +73,6 @@ ENDIF (Makeinfo_FOUND) add_subdirectory (misc) -SET(CPACK_GENERATOR TGZ) -SET(CPACK_SOURCE_GENERATOR TGZ ZIP) -SET(CPACK_PACKAGE_VERSION_MAJOR 1) -SET(CPACK_PACKAGE_VERSION_MINOR 1) -SET(CPACK_PACKAGE_VERSION_PATCH 0) -SET(CPACK_SOURCE_IGNORE_FILES /\\\\.;/CVS/;~) -SET(CPACK_SOURCE_PACKAGE_FILE_NAME - ${PROJECT_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}) INCLUDE(CPack) MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY EXECUTABLE_OUTPUT_PATH) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index a0af755..05620bf 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -20,12 +20,11 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.texi.in ${CMAKE_CURRENT_BINARY_DIR}/version.texi) + SET (TEXI_FILE ${CMAKE_CURRENT_SOURCE_DIR}/Batch.texi) -ADD_CUSTOM_TARGET(doc ALL - ${MAKEINFO_EXECUTABLE} --html ${TEXI_FILE} -I ${CMAKE_CURRENT_SOURCE_DIR} - DEPENDS ${TEXI_FILE} - ) +ADD_CUSTOM_TARGET(doc ALL ${MAKEINFO_EXECUTABLE} --html ${TEXI_FILE}) FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Batch) diff --git a/doc/version.texi b/doc/version.texi deleted file mode 100644 index 00cc319..0000000 --- a/doc/version.texi +++ /dev/null @@ -1,4 +0,0 @@ -@set UPDATED 23 April 2010 -@set UPDATED-MONTH April 2010 -@set EDITION 1.1.0 -@set VERSION 1.1.0 diff --git a/doc/version.texi.in b/doc/version.texi.in new file mode 100644 index 0000000..ea149e8 --- /dev/null +++ b/doc/version.texi.in @@ -0,0 +1,2 @@ +@set UPDATED 23 April 2010 +@set VERSION @CPACK_PACKAGE_VERSION_MAJOR@.@CPACK_PACKAGE_VERSION_MINOR@.@CPACK_PACKAGE_VERSION_PATCH@ -- 2.39.2