Skip to content

Commit

Permalink
Merge pull request #2265 from KhronosGroup/fix-2263
Browse files Browse the repository at this point in the history
Bump to CMake 3.6 and handle deprecated Python module check.
  • Loading branch information
HansKristian-Work authored Jan 16, 2024
2 parents 37a58e4 + 41197bb commit 0a5e7b0
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# 2. The MIT License, found at <http://opensource.org/licenses/MIT>.
#

cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.6)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_EXTENSIONS OFF)

Expand Down Expand Up @@ -465,7 +465,19 @@ if (SPIRV_CROSS_CLI)
# - Update the reference files
# - Get cycle counts from malisc
# - Keep failing outputs
find_package(PythonInterp)
if (${CMAKE_VERSION} VERSION_GREATER "3.12")
find_package(Python3)
if (${PYTHON3_FOUND})
set(PYTHONINTERP_FOUND ON)
set(PYTHON_VERSION_MAJOR 3)
set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})
else()
set(PYTHONINTERP_FOUND OFF)
endif()
else()
find_package(PythonInterp)
endif()

find_program(spirv-cross-glslang NAMES glslangValidator
PATHS ${CMAKE_CURRENT_SOURCE_DIR}/external/glslang-build/output/bin
NO_DEFAULT_PATH)
Expand Down

0 comments on commit 0a5e7b0

Please sign in to comment.