Skip to content

Commit

Permalink
set arm64 for osx
Browse files Browse the repository at this point in the history
  • Loading branch information
vijaiaeroastro committed Nov 25, 2024
1 parent edd3a98 commit 2fb7bff
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ if (USE_PACKAGED_SUBMODULES)
option(USE_INCLUDED_SSL "Use included libressl" ON)
else()
message("USE_PACKAGED_SUBMODULES is OFF")
# Set the vcpkg target triplet for macOS arm64, only on Apple platforms
if (APPLE)
if (NOT DEFINED ENV{VCPKG_TARGET_TRIPLET})
set(VCPKG_TARGET_TRIPLET "arm64-osx" CACHE STRING "Target triplet for vcpkg on Apple")
endif()
message(STATUS "Using VCPKG_TARGET_TRIPLET=${VCPKG_TARGET_TRIPLET} for Apple platform")
else()
message(STATUS "Apple platform not detected, default triplet will be used")
endif()
if (EXISTS "${CMAKE_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake")
message("Using VCPKG Toolchain")
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake" CACHE STRING "Vcpkg toolchain file")
Expand Down

0 comments on commit 2fb7bff

Please sign in to comment.