mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +00:00
CMake: Add windows vcpkg triplet files to minimize port builds
Now we won't be building both debug and release for all ports when using a release, distribution, or sanitizer preset. Eventually we can use this to build all our ports with clang-cl.exe. That doesn't work at all out of the box, and needs a bunch of extra legwork. Likely legwork for every port we build.
This commit is contained in:
parent
ffd946d47d
commit
5783caf68e
Notes:
github-actions[bot]
2025-06-22 19:34:35 +00:00
Author: https://github.com/ADKaster
Commit: 5783caf68e
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5164
7 changed files with 29 additions and 6 deletions
4
Meta/CMake/vcpkg/base-triplets/x64-windows.cmake
Normal file
4
Meta/CMake/vcpkg/base-triplets/x64-windows.cmake
Normal file
|
@ -0,0 +1,4 @@
|
|||
set(VCPKG_TARGET_ARCHITECTURE x64)
|
||||
set(VCPKG_CRT_LINKAGE dynamic)
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/base.cmake)
|
2
Meta/CMake/vcpkg/debug-triplets/x64-windows.cmake
Normal file
2
Meta/CMake/vcpkg/debug-triplets/x64-windows.cmake
Normal file
|
@ -0,0 +1,2 @@
|
|||
include (${CMAKE_CURRENT_LIST_DIR}/../base-triplets/x64-windows.cmake)
|
||||
include (${CMAKE_CURRENT_LIST_DIR}/debug.cmake)
|
|
@ -0,0 +1,3 @@
|
|||
# Note: This is equivalent to upstream x64-windows-static-md-release.cmake
|
||||
include (${CMAKE_CURRENT_LIST_DIR}/../base-triplets/x64-windows.cmake)
|
||||
include (${CMAKE_CURRENT_LIST_DIR}/distribution.cmake)
|
|
@ -1,11 +1,14 @@
|
|||
# The generated file here is read by vcpkg/base-triplets/base.cmake to ensure consistency between the project
|
||||
# build and the vcpkg build.
|
||||
set(EXTRA_VCPKG_VARIABLES "")
|
||||
if (NOT "${CMAKE_C_COMPILER}" STREQUAL "")
|
||||
string(APPEND EXTRA_VCPKG_VARIABLES "set(ENV{CC} ${CMAKE_C_COMPILER})\n")
|
||||
endif()
|
||||
if (NOT "${CMAKE_CXX_COMPILER}" STREQUAL "")
|
||||
string(APPEND EXTRA_VCPKG_VARIABLES "set(ENV{CXX} ${CMAKE_CXX_COMPILER})\n")
|
||||
if (NOT WIN32)
|
||||
# Supporting Clang-CL for all our vcpkg ports is an adventure in itself, so let's not
|
||||
if (NOT "${CMAKE_C_COMPILER}" STREQUAL "")
|
||||
string(APPEND EXTRA_VCPKG_VARIABLES "set(ENV{CC} ${CMAKE_C_COMPILER})\n")
|
||||
endif()
|
||||
if (NOT "${CMAKE_CXX_COMPILER}" STREQUAL "")
|
||||
string(APPEND EXTRA_VCPKG_VARIABLES "set(ENV{CXX} ${CMAKE_CXX_COMPILER})\n")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Workaround for bad patchelf interaction with binutils 2.43.50
|
||||
|
|
3
Meta/CMake/vcpkg/release-triplets/x64-windows.cmake
Normal file
3
Meta/CMake/vcpkg/release-triplets/x64-windows.cmake
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Note: This is equivalent to upstream x64-windows-release.cmake
|
||||
include (${CMAKE_CURRENT_LIST_DIR}/../base-triplets/x64-windows.cmake)
|
||||
include (${CMAKE_CURRENT_LIST_DIR}/release.cmake)
|
|
@ -2,4 +2,9 @@ set(VCPKG_BUILD_TYPE release)
|
|||
set(VCPKG_LIBRARY_LINKAGE dynamic)
|
||||
|
||||
set(VCPKG_C_FLAGS "")
|
||||
set(VCPKG_CXX_FLAGS "-frtti")
|
||||
|
||||
if (WIN32)
|
||||
set(VCPKG_CXX_FLAGS "/GR")
|
||||
else()
|
||||
set(VCPKG_CXX_FLAGS "-frtti")
|
||||
endif()
|
||||
|
|
3
Meta/CMake/vcpkg/sanitizer-triplets/x64-windows.cmake
Normal file
3
Meta/CMake/vcpkg/sanitizer-triplets/x64-windows.cmake
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Note: This is mostly equivalent to upstream x64-windows-release.cmake
|
||||
include (${CMAKE_CURRENT_LIST_DIR}/../base-triplets/x64-windows.cmake)
|
||||
include (${CMAKE_CURRENT_LIST_DIR}/sanitizer.cmake)
|
Loading…
Add table
Add a link
Reference in a new issue