Skip to content

Commit d091728

Browse files
authored
Merge pull request KhronosGroup#2395 from nihui/patch-4
Find python interpreter from host when cross-compiling
2 parents 6a6e311 + 967fa92 commit d091728

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,15 @@ function(glslang_set_link_args TARGET)
228228
endif()
229229
endfunction(glslang_set_link_args)
230230

231+
if(NOT COMMAND find_host_package)
232+
macro(find_host_package)
233+
find_package(${ARGN})
234+
endmacro()
235+
endif()
236+
231237
# CMake needs to find the right version of python, right from the beginning,
232238
# otherwise, it will find the wrong version and fail later
233-
find_package(PythonInterp 3 REQUIRED)
239+
find_host_package(PythonInterp 3 REQUIRED)
234240

235241
# Root directory for build-time generated include files
236242
set(GLSLANG_GENERATED_INCLUDEDIR "${CMAKE_BINARY_DIR}/include")

0 commit comments

Comments
 (0)