Unverified Commit 967fa92d by nihui Committed by GitHub

Try to find python interpreter from host first

parent 6a6e311d
...@@ -228,9 +228,15 @@ function(glslang_set_link_args TARGET) ...@@ -228,9 +228,15 @@ function(glslang_set_link_args TARGET)
endif() endif()
endfunction(glslang_set_link_args) endfunction(glslang_set_link_args)
if(NOT COMMAND find_host_package)
macro(find_host_package)
find_package(${ARGN})
endmacro()
endif()
# CMake needs to find the right version of python, right from the beginning, # CMake needs to find the right version of python, right from the beginning,
# otherwise, it will find the wrong version and fail later # otherwise, it will find the wrong version and fail later
find_package(PythonInterp 3 REQUIRED) find_host_package(PythonInterp 3 REQUIRED)
# Root directory for build-time generated include files # Root directory for build-time generated include files
set(GLSLANG_GENERATED_INCLUDEDIR "${CMAKE_BINARY_DIR}/include") set(GLSLANG_GENERATED_INCLUDEDIR "${CMAKE_BINARY_DIR}/include")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment