Allow passing custom git revision to CMake.

This commit is contained in:
Bartosz Taudul 2024-09-20 22:08:03 +02:00
parent 87285cfcaa
commit c3cf13fc64
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -181,8 +181,12 @@ endif()
target_link_libraries(${PROJECT_NAME} PRIVATE TracyServer TracyImGui)
if(NOT DEFINED GIT_REV)
set(GIT_REV "HEAD")
endif()
add_custom_target(git-ref
COMMAND python3 ${CMAKE_CURRENT_LIST_DIR}/../extra/git-ref.py
COMMAND python3 ${CMAKE_CURRENT_LIST_DIR}/../extra/git-ref.py ${GIT_REV}
BYPRODUCTS GitRef.hpp
)
add_dependencies(${PROJECT_NAME} git-ref)