Actually find the python executable before use.

Also change PYTHON_EXE to PYTHON_EXECUTABLE to match what
the cmake documentation says.
This commit is contained in:
Andrew Woloszyn 2016-02-24 10:11:07 -05:00
parent b38ac4bae6
commit 1d52555f93

View File

@ -103,8 +103,21 @@ function(spvtools_default_compile_options TARGET)
endif()
endfunction()
if(NOT COMMAND find_host_package)
macro(find_host_package)
find_package(${ARGN})
endmacro()
endif()
if(NOT COMMAND find_host_program)
macro(find_host_program)
find_program(${ARGN})
endmacro()
endif()
find_host_package(PythonInterp)
add_custom_target(spirv-tools-build-version
${PYTHON_EXE}
${PYTHON_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/utils/update_build_version.py
${spirv-tools_SOURCE_DIR}
COMMENT "Update build-version.inc in the Spirv-tools build directory (if necessary).")