diff options
Diffstat (limited to 'cmake/utils/GenVersionHeader.cmake')
| -rw-r--r-- | cmake/utils/GenVersionHeader.cmake | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cmake/utils/GenVersionHeader.cmake b/cmake/utils/GenVersionHeader.cmake new file mode 100644 index 00000000..5f5821b9 --- /dev/null +++ b/cmake/utils/GenVersionHeader.cmake @@ -0,0 +1,11 @@ +include(${CMAKE_CURRENT_LIST_DIR}/GetGitHash.cmake) +get_git_hash(${GIT_DIR} ${PACKAGE_VERSION_MAJOR} ${PACKAGE_VERSION_MINOR} ${PACKAGE_VERSION_PATCH} PACKAGE_VERSION_STRING) + +configure_file(${INPUT_FILE} ${OUTPUT_FILE}.tmp @ONLY) + +execute_process( + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${OUTPUT_FILE}.tmp ${OUTPUT_FILE} +) + +file(REMOVE ${OUTPUT_FILE}.tmp) |
