Skip to content

Commit

Permalink
ci: linux: Fix static build
Browse files Browse the repository at this point in the history
  • Loading branch information
calc84maniac committed Aug 9, 2024
1 parent d934c67 commit 314ef4b
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.linux.workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
include:
- statictype: ON
qtver: Qt6
host_triplet: release
host_triplet: static-xcb-release
release_suffix: static
- statictype: OFF
qtver: Qt6-Dynamic
Expand Down
1 change: 1 addition & 0 deletions gui/qt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ if(TRY_STATIC_LIBS)
endif()

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_SKIP_RPATH TRUE)

set(USED_CMAKE_GENERATOR "${CMAKE_GENERATOR}" CACHE STRING "Expose CMAKE_GENERATOR" FORCE)
message(STATUS "Detected system: ${CMAKE_SYSTEM_NAME} - host processor: ${CMAKE_HOST_SYSTEM_PROCESSOR} - CXX_COMPILER: ${CMAKE_CXX_COMPILER_ID}")
Expand Down
2 changes: 1 addition & 1 deletion gui/qt/CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
"cacheVariables": {
"VCPKG_TARGET_TRIPLET": {
"type": "STRING",
"value": "x64-linux"
"value": "x64-linux-static-xcb"
}
}
},
Expand Down
11 changes: 11 additions & 0 deletions gui/qt/triplets/x64-linux-static-xcb-release.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)
if(PORT MATCHES "^(xcb.*|libxau|libxdmcp|xorg-macros)$")
set(VCPKG_LIBRARY_LINKAGE dynamic)
set(X_VCPKG_FORCE_VCPKG_X_LIBRARIES ON)
set(VCPKG_FIXUP_ELF_RPATH ON)
endif()

set(VCPKG_CMAKE_SYSTEM_NAME Linux)
set(VCPKG_BUILD_TYPE release)
10 changes: 10 additions & 0 deletions gui/qt/triplets/x64-linux-static-xcb.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)
if(PORT MATCHES "^(xcb.*|libxau|libxdmcp|xorg-macros)$")
set(VCPKG_LIBRARY_LINKAGE dynamic)
set(X_VCPKG_FORCE_VCPKG_X_LIBRARIES ON)
set(VCPKG_FIXUP_ELF_RPATH ON)
endif()

set(VCPKG_CMAKE_SYSTEM_NAME Linux)
6 changes: 5 additions & 1 deletion gui/qt/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,12 @@
{
"name": "qtbase",
"default-features": false,
"features": [ "xcb" ],
"features": [ "fontconfig", "xcb" ],
"platform": "linux"
},
{
"name": "xcb-image",
"platform": "linux & static"
}
]
}
Expand Down

0 comments on commit 314ef4b

Please sign in to comment.