mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge #1076
1076: Execute `git_revision.py` in the source directory r=Learath2 a=heinrich5991 Previously, if using an out-of-source build directory, git would report an error and no revision string would be added to the final executable.
This commit is contained in:
commit
42e1e3cf0c
|
@ -527,10 +527,11 @@ if(NOT PROJECT_GIT_DIR_ERROR)
|
|||
${PROJECT_GIT_DIR}/logs/HEAD
|
||||
)
|
||||
endif()
|
||||
add_custom_command(OUTPUT src/game/generated/git_revision.cpp
|
||||
add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/src/game/generated/git_revision.cpp
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
${PROJECT_SOURCE_DIR}/scripts/git_revision.py
|
||||
> src/game/generated/git_revision.cpp
|
||||
scripts/git_revision.py
|
||||
> ${PROJECT_BINARY_DIR}/src/game/generated/git_revision.cpp
|
||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||
DEPENDS
|
||||
${GIT_REVISION_EXTRA_DEPS}
|
||||
scripts/git_revision.py
|
||||
|
|
Loading…
Reference in a new issue