mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 03:37:53 +00: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:
@@ -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 "")
|
||||||
|
|||||||
Reference in New Issue
Block a user