From cb171f997d03a05164a1406fa5fd0feaab6da10f Mon Sep 17 00:00:00 2001 From: davila Date: Tue, 30 Dec 2014 18:16:29 +0100 Subject: [PATCH] Version.sh --- CMakeLists.txt | 9 +++++++++ Version.sh.in | 5 +++++ install/CMakeLists.txt | 5 +++++ 3 files changed, 19 insertions(+) create mode 100644 Version.sh.in diff --git a/CMakeLists.txt b/CMakeLists.txt index 2be06fa..5de4a4a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -129,6 +129,15 @@ TODAY(CREATOOLS_COMPILATION_DATE) @ONLY IMMEDIATE ) +## export creatoolsMajorVersion=@PROJECT_MAJOR_VERSION@ +## export creatoolsMinorVersion=@PROJECT_MINOR_VERSION@ +## export creatoolsBuildVersion=@PROJECT_BUILD_VERSION@ +## export creatoolsDate=@CREATOOLS_COMPILATION_DATE@ + CONFIGURE_FILE( + ${CMAKE_CURRENT_SOURCE_DIR}/Version.sh.in + ${${CMAKE_PROJECT_NAME}_BINARY_DIR}/Version.sh + @ONLY IMMEDIATE + ) #================================== # Subdirs diff --git a/Version.sh.in b/Version.sh.in new file mode 100644 index 0000000..7bba2ac --- /dev/null +++ b/Version.sh.in @@ -0,0 +1,5 @@ +export creatoolsMajorVersion=@PROJECT_MAJOR_VERSION@ +export creatoolsMinorVersion=@PROJECT_MINOR_VERSION@ +export creatoolsBuildVersion=@PROJECT_BUILD_VERSION@ +export creatoolsDate=@CREATOOLS_COMPILATION_DATE@ + diff --git a/install/CMakeLists.txt b/install/CMakeLists.txt index 23848ed..0fdc5c5 100644 --- a/install/CMakeLists.txt +++ b/install/CMakeLists.txt @@ -243,4 +243,9 @@ INSTALL(DIRECTORY ${CREATOOLS_SOURCE_PATH}\\\\${CREA_MINITOOLS}/ DESTINATION $ ENDIF (WIN32) +IF (UNIX) + install( FILES ${PROJECT_BINARY_DIR}/Version.sh DESTINATION share/creatools ) + install( FILES ${PROJECT_BINARY_DIR}/Version.txt DESTINATION share/creatools ) +ENDIF (UNIX) + -- 2.47.1