fix macos build

This commit is contained in:
Denis Rouzaud 2024-10-29 15:46:34 +01:00 committed by GitHub
parent d1e63f61aa
commit d1e0bb6f81
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -33,7 +33,7 @@ if(NOT SDK_PATH STREQUAL "")
message(STATUS "Building with SDK -- ${SDK_PATH}")
set(CMAKE_TOOLCHAIN_FILE "${SDK_PATH}/scripts/buildsystems/vcpkg.cmake")
if(APPLE AND NOT VCPKG_TARGET_TRIPLET)
set(VCPKG_TARGET_TRIPLET "x64-osx-dynamic")
message(FATAL_ERROR "VCPKG_TARGET_TRIPLET not set (set it to arm64-osx-dynamic-release or x64-osx-dynamic-release")
endif()
set(WITH_VCPKG ON)
elseif(WITH_VCPKG)
@ -44,7 +44,11 @@ else()
endif()
if(WITH_VCPKG)
list(APPEND CMAKE_PROGRAM_PATH "${VCPKG_INSTALL_PREFIX}/${VCPKG_TARGET_TRIPLET}/")
if(WIN32)
list(APPEND CMAKE_PROGRAM_PATH "${VCPKG_INSTALL_PREFIX}/${VCPKG_TARGET_TRIPLET}/tools/python3/Scripts/")
else()
list(APPEND CMAKE_PROGRAM_PATH "${VCPKG_INSTALL_PREFIX}/${VCPKG_TARGET_TRIPLET}/bin")
endif()
endif()
#############################################################