1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-13 19:29:53 +03:00
aports/testing/libretro-ppsspp/patch-disable-git-version.patch
2021-05-20 09:45:20 +00:00

25 lines
794 B
Diff

Don't use git to append version into source code.
--- a/git-version.cmake
+++ b/git-version.cmake
@@ -1,20 +1,6 @@
set(GIT_VERSION_FILE "${SOURCE_DIR}/git-version.cpp")
-set(GIT_VERSION "unknown")
+set(GIT_VERSION "@VERSION@")
set(GIT_VERSION_UPDATE "1")
-
-find_package(Git)
-if(GIT_FOUND AND EXISTS "${SOURCE_DIR}/.git/")
- execute_process(COMMAND ${GIT_EXECUTABLE} describe --always
- WORKING_DIRECTORY ${SOURCE_DIR}
- RESULT_VARIABLE exit_code
- OUTPUT_VARIABLE GIT_VERSION)
- if(NOT ${exit_code} EQUAL 0)
- message(WARNING "git describe failed, unable to include version.")
- endif()
- string(STRIP ${GIT_VERSION} GIT_VERSION)
-else()
- message(WARNING "git not found, unable to include version.")
-endif()
if(EXISTS ${GIT_VERSION_FILE})
# Don't update if marked not to update.