From 895bb98702a004a8483683241d9c29c19d526a3a Mon Sep 17 00:00:00 2001 From: Brendan Fletcher Date: Fri, 9 Aug 2024 13:07:26 -0400 Subject: [PATCH] ci: linux: Use static libpng-apng in dynamic build --- .github/workflows/build.linux.workflow.yml | 2 +- gui/qt/CMakePresets.json | 6 +++++- gui/qt/triplets/x64-linux-dynamic-apng.cmake | 10 ++++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 gui/qt/triplets/x64-linux-dynamic-apng.cmake diff --git a/.github/workflows/build.linux.workflow.yml b/.github/workflows/build.linux.workflow.yml index 0b156bd7e..3e687d4b3 100644 --- a/.github/workflows/build.linux.workflow.yml +++ b/.github/workflows/build.linux.workflow.yml @@ -26,7 +26,7 @@ jobs: release_suffix: static - statictype: OFF qtver: Qt6-Dynamic - host_triplet: dynamic + host_triplet: dynamic-apng release_suffix: shared steps: diff --git a/gui/qt/CMakePresets.json b/gui/qt/CMakePresets.json index 40309a835..46b9320ec 100644 --- a/gui/qt/CMakePresets.json +++ b/gui/qt/CMakePresets.json @@ -22,6 +22,10 @@ "type": "BOOL", "value": "True" }, + "VCPKG_OVERLAY_TRIPLETS": { + "type": "STRING", + "value": "${sourceDir}/triplets" + }, "TRY_STATIC_LIBS": { "type": "BOOL", "value": "ON" @@ -148,7 +152,7 @@ "cacheVariables": { "VCPKG_TARGET_TRIPLET": { "type": "STRING", - "value": "x64-linux-dynamic" + "value": "x64-linux-dynamic-apng" }, "TRY_STATIC_LIBS": { "type": "BOOL", diff --git a/gui/qt/triplets/x64-linux-dynamic-apng.cmake b/gui/qt/triplets/x64-linux-dynamic-apng.cmake new file mode 100644 index 000000000..965a9740b --- /dev/null +++ b/gui/qt/triplets/x64-linux-dynamic-apng.cmake @@ -0,0 +1,10 @@ +set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE dynamic) +if(PORT STREQUAL "png") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +set(VCPKG_CMAKE_SYSTEM_NAME Linux) + +set(VCPKG_FIXUP_ELF_RPATH ON) \ No newline at end of file