1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 01:51:03 +09:00

Meta: Add vcpkg triplet detection for Windows

Adds simple vcpkg triplet detection on Windows. This allows for the
configure step to succeed.
This commit is contained in:
R-Goc 2025-02-07 17:58:48 +01:00 committed by Andrew Kaster
parent cae0ee6fa7
commit 4ccf165dad
Notes: github-actions[bot] 2025-02-07 20:49:21 +00:00

View file

@ -53,6 +53,8 @@ if (NOT DEFINED CACHE{VCPKG_TARGET_TRIPLET} AND NOT DEFINED CACHE{VCPKG_HOST_TRI
set(os linux) set(os linux)
elseif (os_name MATCHES "Darwin|macOS") elseif (os_name MATCHES "Darwin|macOS")
set(os osx) set(os osx)
elseif (os_name MATCHES "Windows")
set (os windows)
else() else()
message(FATAL_ERROR "Unable to automatically detect os name for vcpkg, please set VCPKG_TARGET_TRIPLET manually") message(FATAL_ERROR "Unable to automatically detect os name for vcpkg, please set VCPKG_TARGET_TRIPLET manually")
endif() endif()
@ -64,8 +66,12 @@ if (NOT DEFINED CACHE{VCPKG_TARGET_TRIPLET} AND NOT DEFINED CACHE{VCPKG_HOST_TRI
string(REPLACE "-triplets" "" triplet_path ${triplet_path}) string(REPLACE "-triplets" "" triplet_path ${triplet_path})
string(TOLOWER ${triplet_path} triplet_path) string(TOLOWER ${triplet_path} triplet_path)
if (NOT triplet_path STREQUAL "distribution") if (NOT triplet_path STREQUAL "distribution")
if (NOT os_name MATCHES "Windows") #NOTE: Windows defaults to dynamic linking
set(full_triplet "${full_triplet}-dynamic") set(full_triplet "${full_triplet}-dynamic")
endif() endif()
elseif (os_name MATCHES "Windows")
set(full_triplet "${full_triplet}-static")
endif()
message(STATUS "Determined host VCPKG_TARGET_TRIPLET: ${full_triplet}") message(STATUS "Determined host VCPKG_TARGET_TRIPLET: ${full_triplet}")
set(VCPKG_TARGET_TRIPLET ${full_triplet} CACHE STRING "") set(VCPKG_TARGET_TRIPLET ${full_triplet} CACHE STRING "")