Skip to content

Commit

Permalink
CMake: Use find_package(Python3) to find Python (#1041)
Browse files Browse the repository at this point in the history
Fixes CMake deprecation warning CMP0148
  • Loading branch information
dneto0 authored Jun 6, 2024
1 parent 8397767 commit b2d5072
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ if (${AMBER_USE_CLSPV} OR ${AMBER_ENABLE_SWIFTSHADER})
endif()

message(STATUS "Using python3")
find_package(PythonInterp 3 REQUIRED)
find_package(Python3 REQUIRED)

message(STATUS "Amber enable SPIRV-Tools: ${AMBER_ENABLE_SPIRV_TOOLS}")
message(STATUS "Amber enable Shaderc: ${AMBER_ENABLE_SHADERC}")
Expand Down
2 changes: 1 addition & 1 deletion samples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ amber_default_compile_options(amber)
add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/src/build-versions.h.fake
COMMAND
${PYTHON_EXECUTABLE}
${Python3_EXECUTABLE}
${PROJECT_SOURCE_DIR}/tools/update_build_version.py
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
Expand Down
2 changes: 1 addition & 1 deletion src/vulkan/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ endif()
add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/src/vk-wrappers.inc.fake
COMMAND
${PYTHON_EXECUTABLE}
${Python3_EXECUTABLE}
${PROJECT_SOURCE_DIR}/tools/update_vk_wrappers.py
${CMAKE_BINARY_DIR}
${PROJECT_SOURCE_DIR}
Expand Down

0 comments on commit b2d5072

Please sign in to comment.