@@ -693,7 +693,7 @@ function(_compile_swift_files
693
693
add_custom_command_target (
694
694
dependency_target
695
695
COMMAND
696
- "${PYTHON_EXECUTABLE} " "${line_directive_tool} " "@${file_path} " --
696
+ "$<TARGET_FILE:Python3::Interpreter> " "${line_directive_tool} " "@${file_path} " --
697
697
"${swift_compiler_tool} " "${main_command} " ${swift_flags}
698
698
${output_option} ${embed_bitcode_option} "@${file_path} "
699
699
${command_touch_standard_outputs}
@@ -731,7 +731,7 @@ function(_compile_swift_files
731
731
"${CMAKE_COMMAND} " "-E" "make_directory" ${module_dir}
732
732
${specific_module_dir}
733
733
COMMAND
734
- "${PYTHON_EXECUTABLE} " "${line_directive_tool} " "@${file_path} " --
734
+ "$<TARGET_FILE:Python3::Interpreter> " "${line_directive_tool} " "@${file_path} " --
735
735
"${swift_compiler_tool} " "-emit-module" "-o" "${module_file} "
736
736
"-avoid-emit-module-source-info"
737
737
${swift_flags} ${swift_module_flags} "@${file_path} "
@@ -766,7 +766,7 @@ function(_compile_swift_files
766
766
COMMAND
767
767
"${CMAKE_COMMAND} " "-E" "make_directory" ${maccatalyst_specific_module_dir}
768
768
COMMAND
769
- "${PYTHON_EXECUTABLE} " "${line_directive_tool} " "@${file_path} " --
769
+ "$<TARGET_FILE:Python3::Interpreter> " "${line_directive_tool} " "@${file_path} " --
770
770
"${swift_compiler_tool} " "-emit-module" "-o" "${maccatalyst_module_file} "
771
771
${maccatalyst_swift_flags} ${maccatalyst_swift_module_flags} "@${file_path} "
772
772
${command_touch_maccatalyst_module_outputs}
@@ -792,7 +792,7 @@ function(_compile_swift_files
792
792
add_custom_command_target (
793
793
sib_dependency_target
794
794
COMMAND
795
- "${PYTHON_EXECUTABLE} " "${line_directive_tool} " "@${file_path} " --
795
+ "$<TARGET_FILE:Python3::Interpreter> " "${line_directive_tool} " "@${file_path} " --
796
796
"${swift_compiler_tool} " "-emit-sib" "-o" "${sib_file} " ${swift_flags} -Onone
797
797
"@${file_path} "
798
798
${command_touch_sib_outputs}
@@ -808,7 +808,7 @@ function(_compile_swift_files
808
808
add_custom_command_target (
809
809
sibopt_dependency_target
810
810
COMMAND
811
- "${PYTHON_EXECUTABLE} " "${line_directive_tool} " "@${file_path} " --
811
+ "$<TARGET_FILE:Python3::Interpreter> " "${line_directive_tool} " "@${file_path} " --
812
812
"${swift_compiler_tool} " "-emit-sib" "-o" "${sibopt_file} " ${swift_flags} -O
813
813
"@${file_path} "
814
814
${command_touch_sibopt_outputs}
@@ -825,7 +825,7 @@ function(_compile_swift_files
825
825
add_custom_command_target (
826
826
sibgen_dependency_target
827
827
COMMAND
828
- "${PYTHON_EXECUTABLE} " "${line_directive_tool} " "@${file_path} " --
828
+ "$<TARGET_FILE:Python3::Interpreter> " "${line_directive_tool} " "@${file_path} " --
829
829
"${swift_compiler_tool} " "-emit-sibgen" "-o" "${sibgen_file} " ${swift_flags}
830
830
"@${file_path} "
831
831
${command_touch_sibgen_outputs}
0 commit comments