Commit 8ffb9d13 authored by Ghislain MARY's avatar Ghislain MARY

GIT_VERSION is now always defined, even when the sources have been put outside of git.

parent 1cc53e48
......@@ -41,12 +41,9 @@ if(GIT_DESCRIBE)
message(FATAL_ERROR "MEDIASTREAMER_VERSION and git tag differ. Please put them identical")
endif()
set(GIT_VERSION "${GIT_DESCRIBE}")
configure_file("${WORK_DIR}/gitversion.h.in" "${OUTPUT_DIR}/gitversion.h" @ONLY)
elseif(GIT_REVISION)
set(GIT_VERSION "${MEDIASTREAMER_VERSION}_${GIT_REVISION}")
configure_file("${WORK_DIR}/gitversion.h.in" "${OUTPUT_DIR}/gitversion.h" @ONLY)
else()
if(NOT EXISTS "${OUTPUT_DIR}/gitversion.h")
execute_process(COMMAND ${CMAKE_COMMAND} -E touch "${OUTPUT_DIR}/gitversion.h")
endif()
set(GIT_VERSION "unknown")
endif()
configure_file("${WORK_DIR}/gitversion.h.in" "${OUTPUT_DIR}/gitversion.h" @ONLY)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment