mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 11:21:12 +08:00
Find Python interpreter to used for scripts/buildsystems/osx/applocal.py (#27179)
The deployment script works with Python 2 and 3. On modern macOS machines Python 2 may not be available. Find either version and use it. Co-authored-by: Lily Wang <494550702@qq.com>
This commit is contained in:
parent
8f229feaf1
commit
8f06ea42d9
@ -603,8 +603,9 @@ function(add_executable)
|
|||||||
)
|
)
|
||||||
elseif(Z_VCPKG_TARGET_TRIPLET_PLAT MATCHES "osx")
|
elseif(Z_VCPKG_TARGET_TRIPLET_PLAT MATCHES "osx")
|
||||||
if(NOT MACOSX_BUNDLE_IDX EQUAL -1)
|
if(NOT MACOSX_BUNDLE_IDX EQUAL -1)
|
||||||
|
find_package(Python COMPONENTS Interpreter)
|
||||||
add_custom_command(TARGET "${target_name}" POST_BUILD
|
add_custom_command(TARGET "${target_name}" POST_BUILD
|
||||||
COMMAND python "${Z_VCPKG_TOOLCHAIN_DIR}/osx/applocal.py"
|
COMMAND "${Python_EXECUTABLE}" "${Z_VCPKG_TOOLCHAIN_DIR}/osx/applocal.py"
|
||||||
"$<TARGET_FILE:${target_name}>"
|
"$<TARGET_FILE:${target_name}>"
|
||||||
"${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$<CONFIG:Debug>:/debug>"
|
"${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$<CONFIG:Debug>:/debug>"
|
||||||
VERBATIM
|
VERBATIM
|
||||||
|
Loading…
x
Reference in New Issue
Block a user