mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-08 05:27:14 +09:00
Meta: Add a workaround for missing dllimport for skcms API
This should really be fixed by patching the skcms top level header, but this hack works for now on Windows for linking LibGfx.
This commit is contained in:
parent
21dbfd9114
commit
06ff47749f
Notes:
github-actions[bot]
2025-02-13 02:15:12 +00:00
Author: https://github.com/ADKaster
Commit: 06ff47749f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3551
Reviewed-by: https://github.com/alimpfard ✅
Reviewed-by: https://github.com/shannonbooth
2 changed files with 9 additions and 2 deletions
|
@ -5,10 +5,13 @@ include(fontconfig)
|
|||
find_package(unofficial-skia CONFIG)
|
||||
if(unofficial-skia_FOUND)
|
||||
set(SKIA_TARGET unofficial::skia::skia)
|
||||
if (HAS_FONTCONFIG)
|
||||
if (HAS_FONTCONFIG AND NOT WIN32)
|
||||
set(CMAKE_LINK_GROUP_USING_no_as_needed_SUPPORTED TRUE CACHE BOOL "Link group using no-as-needed supported")
|
||||
set(CMAKE_LINK_GROUP_USING_no_as_needed "LINKER:--push-state,--no-as-needed" "LINKER:--pop-state" CACHE STRING "Link group using no-as-needed")
|
||||
set_property(TARGET unofficial::skia::skia APPEND PROPERTY INTERFACE_LINK_LIBRARIES "$<LINK_GROUP:no_as_needed,Fontconfig::Fontconfig>")
|
||||
elseif(WIN32)
|
||||
# FIXME: Submit a proper patch to vcpkg and skia to the SKCMS header file to set this in a cross-platform way.
|
||||
set_property(TARGET unofficial::skia::skia APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS "SKCMS_API=__declspec(dllimport)")
|
||||
endif()
|
||||
else()
|
||||
find_package(PkgConfig)
|
||||
|
|
|
@ -279,7 +279,11 @@ set(SKIA_CXX_FLAGS_REL "${VCPKG_COMBINED_CXX_FLAGS_RELEASE}")
|
|||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
foreach (str IN ITEMS SKIA_CXX_FLAGS_DBG SKIA_CXX_FLAGS_REL)
|
||||
string(APPEND ${str} " -DSKCMS_API=[[gnu::visibility(\\\\\\\"default\\\\\\\")]]")
|
||||
if (VCPKG_TARGET_IS_WINDOWS)
|
||||
string(APPEND ${str} " -DSKCMS_API=__declspec(dllexport)")
|
||||
else()
|
||||
string(APPEND ${str} " -DSKCMS_API=[[gnu::visibility(\\\\\\\"default\\\\\\\")]]")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue