summaryrefslogtreecommitdiffstats
path: root/CMakeScripts/inkscape-version.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeScripts/inkscape-version.cmake')
-rw-r--r--CMakeScripts/inkscape-version.cmake18
1 files changed, 2 insertions, 16 deletions
diff --git a/CMakeScripts/inkscape-version.cmake b/CMakeScripts/inkscape-version.cmake
index cf6cadbc4..adfb3ddd8 100644
--- a/CMakeScripts/inkscape-version.cmake
+++ b/CMakeScripts/inkscape-version.cmake
@@ -15,20 +15,6 @@ if(EXISTS ${INKSCAPE_SOURCE_DIR}/.bzr/)
OUTPUT_VARIABLE INKSCAPE_REVISION
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
+message("revision is " ${INKSCAPE_REVISION})
-file(WRITE
- ${INKSCAPE_BINARY_DIR}/src/inkscape-version.cpp.txt
- # unlike autoconf, include config.h
- "#ifdef HAVE_CONFIG_H\n"
- "# include <config.h>\n"
- "#endif\n"
- "\n"
- "namespace Inkscape {\n"
- " char const *version_string = VERSION \" \" \"${INKSCAPE_REVISION}\";\n"
- "}\n")
-
-# Copy the file to the final header only if the version changes
-# and avoid needless rebuilds
-execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
- ${INKSCAPE_BINARY_DIR}/src/inkscape-version.cpp.txt
- ${INKSCAPE_BINARY_DIR}/src/inkscape-version.cpp)
+configure_file(${INKSCAPE_BINARY_DIR}/src/inkscape-version.cpp.in ${INKSCAPE_BINARY_DIR}/src/inkscape-version.cpp)