mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 12:23:53 +00:00
Let CMake discover python3 and make it required since it is effectively needed to build
This gives a better error message and helps finding the correct python executable since python3 may actually be only named python on windows for example.
This commit is contained in:
parent
2183962ef7
commit
7455e5890e
@ -189,8 +189,9 @@ if(NOT DEFINED GIT_REV)
|
|||||||
set(GIT_REV "HEAD")
|
set(GIT_REV "HEAD")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
find_package(Python3 COMPONENTS Interpreter REQUIRED)
|
||||||
add_custom_target(git-ref
|
add_custom_target(git-ref
|
||||||
COMMAND python3 ${CMAKE_CURRENT_LIST_DIR}/../extra/git-ref.py ${GIT_REV}
|
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/../extra/git-ref.py ${GIT_REV}
|
||||||
BYPRODUCTS GitRef.hpp
|
BYPRODUCTS GitRef.hpp
|
||||||
)
|
)
|
||||||
add_dependencies(${PROJECT_NAME} git-ref)
|
add_dependencies(${PROJECT_NAME} git-ref)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user