From ac17445c1bb4c68f3d0703647de07ff2c296c732 Mon Sep 17 00:00:00 2001 From: Guillaume Pasero <guillaume.pasero@c-s.fr> Date: Wed, 20 Jul 2016 16:18:22 +0200 Subject: [PATCH] DOC: fill and install a VERSION file --- CMakeLists.txt | 6 ++++++ VERSION | 3 +++ 2 files changed, 9 insertions(+) create mode 100644 VERSION diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e1824a75e..91a22260cf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -91,6 +91,8 @@ set(OTB_VERSION_MINOR "6") set(OTB_VERSION_PATCH "0") set(OTB_VERSION_STRING "${OTB_VERSION_MAJOR}.${OTB_VERSION_MINOR}.${OTB_VERSION_PATCH}") +string(TIMESTAMP OTB_BUILD_TIMESTAMP) + if(NOT OTB_INSTALL_RUNTIME_DIR) set(OTB_INSTALL_RUNTIME_DIR bin) endif() @@ -337,6 +339,10 @@ install(FILES ${OTB_FIND_PACKAGE_SCRIPTS} DESTINATION ${OTB_INSTALL_PACKAGE_DIR} # install(FILES "LICENSE" "NOTICE" "README.txt" DESTINATION ${OTB_INSTALL_DOC_DIR} COMPONENT Runtime) install(FILES "LICENSE" DESTINATION ${OTB_INSTALL_DOC_DIR} COMPONENT Runtime) +# Configure and install VERSION file +configure_file(VERSION VERSION @ONLY) +install(FILES ${OTB_BINARY_DIR}/VERSION DESTINATION ${OTB_INSTALL_DOC_DIR} COMPONENT Runtime) + if(BUILD_TESTING) add_subdirectory(Utilities/InstallTest) endif() diff --git a/VERSION b/VERSION new file mode 100644 index 0000000000..f236792805 --- /dev/null +++ b/VERSION @@ -0,0 +1,3 @@ +OTB Version: @OTB_VERSION_STRING@ +Build Date: @OTB_BUILD_TIMESTAMP@ +@OTB_GIT_STATUS_MESSAGE@ -- GitLab