mirror of
https://github.com/stenzek/duckstation.git
synced 2025-07-29 06:11:47 +00:00
CI/Flatpak: Simplify deps build
I'll probably drop it in the future since there was only one or two people who indicated that they're using it. But at least now I don't have another file I need to keep up to date. So consider the Flatpak package as deprecated.
This commit is contained in:
parent
3426bcdc71
commit
6c4300c6c7
@ -249,6 +249,17 @@ endfunction()
|
||||
function(install_imported_dep_library name)
|
||||
get_target_property(SONAME "${name}" IMPORTED_SONAME_RELEASE)
|
||||
get_target_property(LOCATION "${name}" IMPORTED_LOCATION_RELEASE)
|
||||
|
||||
# Only install if it's not a system library.
|
||||
foreach(path ${CMAKE_PREFIX_PATH})
|
||||
string(FIND "${LOCATION}" "${path}" out)
|
||||
if (NOT "${out}" EQUAL 0)
|
||||
message(STATUS "Not installing imported system library ${name}")
|
||||
return()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
message(STATUS "Installing imported library ${SONAME}")
|
||||
install(FILES "${LOCATION}" RENAME "${SONAME}" DESTINATION "${CMAKE_INSTALL_LIBDIR}")
|
||||
endfunction()
|
||||
|
||||
|
@ -1,17 +0,0 @@
|
||||
# SPDX-FileCopyrightText: 2019-2024 Connor McLaughlin <stenzek@gmail.com>
|
||||
# SPDX-License-Identifier: CC-BY-NC-ND-4.0
|
||||
|
||||
name: libbacktrace
|
||||
buildsystem: autotools
|
||||
no-autogen: true
|
||||
build-options:
|
||||
strip: false
|
||||
no-debuginfo: true
|
||||
sources:
|
||||
- type: git
|
||||
url: "https://github.com/ianlancetaylor/libbacktrace.git"
|
||||
commit: "86885d14049fab06ef8a33aac51664230ca09200"
|
||||
cleanup:
|
||||
- /include
|
||||
- /lib/*.a
|
||||
- /lib/*.la
|
@ -1,37 +0,0 @@
|
||||
# SPDX-FileCopyrightText: 2019-2025 Connor McLaughlin <stenzek@gmail.com>
|
||||
# SPDX-License-Identifier: CC-BY-NC-ND-4.0
|
||||
|
||||
name: libzip
|
||||
buildsystem: cmake-ninja
|
||||
builddir: true
|
||||
config-opts:
|
||||
- "-DCMAKE_BUILD_TYPE=Release"
|
||||
- "-DBUILD_SHARED_LIBS=ON"
|
||||
- "-DENABLE_COMMONCRYPTO=OFF"
|
||||
- "-DENABLE_GNUTLS=OFF"
|
||||
- "-DENABLE_MBEDTLS=OFF"
|
||||
- "-DENABLE_OPENSSL=OFF"
|
||||
- "-DENABLE_WINDOWS_CRYPTO=OFF"
|
||||
- "-DENABLE_BZIP2=OFF"
|
||||
- "-DENABLE_LZMA=OFF"
|
||||
- "-DENABLE_ZSTD=ON"
|
||||
- "-DLIBZIP_DO_INSTALL=ON"
|
||||
- "-DBUILD_TOOLS=OFF"
|
||||
- "-DBUILD_REGRESS=OFF"
|
||||
- "-DBUILD_OSSFUZZ=OFF"
|
||||
- "-DBUILD_EXAMPLES=OFF"
|
||||
- "-DBUILD_DOC=OFF"
|
||||
build-options:
|
||||
strip: true
|
||||
sources:
|
||||
- type: git
|
||||
url: "https://github.com/nih-at/libzip.git"
|
||||
commit: "f30f5290de485348442d168cd7b2eb714d1f20f9"
|
||||
cleanup:
|
||||
- /bin
|
||||
- /include
|
||||
- /lib/*.a
|
||||
- /lib/*.la
|
||||
- /lib/cmake
|
||||
- /lib/pkgconfig
|
||||
- /share
|
@ -1,24 +0,0 @@
|
||||
# SPDX-FileCopyrightText: 2019-2024 Connor McLaughlin <stenzek@gmail.com>
|
||||
# SPDX-License-Identifier: CC-BY-NC-ND-4.0
|
||||
|
||||
name: shaderc
|
||||
buildsystem: cmake-ninja
|
||||
builddir: true
|
||||
config-opts:
|
||||
- "-DCMAKE_BUILD_TYPE=Release"
|
||||
- "-DSHADERC_SKIP_TESTS=ON"
|
||||
- "-DSHADERC_SKIP_EXAMPLES=ON"
|
||||
- "-DSHADERC_SKIP_COPYRIGHT_CHECK=ON"
|
||||
build-options:
|
||||
strip: true
|
||||
sources:
|
||||
- type: git
|
||||
url: "https://github.com/stenzek/shaderc.git"
|
||||
commit: "4daf9d466ad00897f755163dd26f528d14e1db44"
|
||||
cleanup:
|
||||
- /bin
|
||||
- /include
|
||||
- /lib/*.a
|
||||
- /lib/*.la
|
||||
- /lib/cmake
|
||||
- /lib/pkgconfig
|
@ -1,34 +0,0 @@
|
||||
# SPDX-FileCopyrightText: 2019-2024 Connor McLaughlin <stenzek@gmail.com>
|
||||
# SPDX-License-Identifier: CC-BY-NC-ND-4.0
|
||||
|
||||
name: spirv-cross
|
||||
buildsystem: cmake-ninja
|
||||
builddir: true
|
||||
config-opts:
|
||||
- "-DCMAKE_BUILD_TYPE=Release"
|
||||
- "-DSPIRV_CROSS_SHARED=ON"
|
||||
- "-DSPIRV_CROSS_STATIC=OFF"
|
||||
- "-DSPIRV_CROSS_CLI=OFF"
|
||||
- "-DSPIRV_CROSS_ENABLE_TESTS=OFF"
|
||||
- "-DSPIRV_CROSS_ENABLE_GLSL=ON"
|
||||
- "-DSPIRV_CROSS_ENABLE_HLSL=OFF"
|
||||
- "-DSPIRV_CROSS_ENABLE_MSL=OFF"
|
||||
- "-DSPIRV_CROSS_ENABLE_CPP=OFF"
|
||||
- "-DSPIRV_CROSS_ENABLE_REFLECT=OFF"
|
||||
- "-DSPIRV_CROSS_ENABLE_C_API=ON"
|
||||
- "-DSPIRV_CROSS_ENABLE_UTIL=ON"
|
||||
build-options:
|
||||
strip: true
|
||||
sources:
|
||||
- type: git
|
||||
url: "https://github.com/KhronosGroup/SPIRV-Cross.git"
|
||||
tag: "vulkan-sdk-1.4.309.0"
|
||||
commit: "2c32b6bf86f3c4a5539aa1f0bacbd59fe61759cf"
|
||||
cleanup:
|
||||
- /bin
|
||||
- /include
|
||||
- /lib/*.a
|
||||
- /lib/*.la
|
||||
- /lib/cmake
|
||||
- /lib/pkgconfig
|
||||
- /share
|
@ -1,31 +0,0 @@
|
||||
# SPDX-FileCopyrightText: 2019-2025 Connor McLaughlin <stenzek@gmail.com>
|
||||
# SPDX-License-Identifier: CC-BY-NC-ND-4.0
|
||||
|
||||
name: cpuinfo
|
||||
buildsystem: cmake-ninja
|
||||
builddir: true
|
||||
config-opts:
|
||||
- "-DCMAKE_BUILD_TYPE=Release"
|
||||
- "-DCPUINFO_LIBRARY_TYPE=shared"
|
||||
- "-DCPUINFO_RUNTIME_TYPE=shared"
|
||||
- "-DCPUINFO_LOG_LEVEL=error"
|
||||
- "-DCPUINFO_LOG_TO_STDIO=ON"
|
||||
- "-DCPUINFO_BUILD_TOOLS=OFF"
|
||||
- "-DCPUINFO_BUILD_UNIT_TESTS=OFF"
|
||||
- "-DCPUINFO_BUILD_MOCK_TESTS=OFF"
|
||||
- "-DCPUINFO_BUILD_BENCHMARKS=OFF"
|
||||
- "-DUSE_SYSTEM_LIBS=ON"
|
||||
build-options:
|
||||
strip: true
|
||||
sources:
|
||||
- type: git
|
||||
url: "https://github.com/stenzek/cpuinfo.git"
|
||||
commit: "3ebbfd45645650c4940bf0f3b4d25ab913466bb0"
|
||||
cleanup:
|
||||
- /bin
|
||||
- /include
|
||||
- /lib/*.a
|
||||
- /lib/*.la
|
||||
- /lib/cmake
|
||||
- /lib/pkgconfig
|
||||
- /share
|
@ -1,23 +0,0 @@
|
||||
# SPDX-FileCopyrightText: 2019-2024 Connor McLaughlin <stenzek@gmail.com>
|
||||
# SPDX-License-Identifier: CC-BY-NC-ND-4.0
|
||||
|
||||
name: discord-rpc
|
||||
buildsystem: cmake-ninja
|
||||
builddir: true
|
||||
config-opts:
|
||||
- "-DCMAKE_BUILD_TYPE=Release"
|
||||
- "-DBUILD_SHARED_LIBS=ON"
|
||||
build-options:
|
||||
strip: true
|
||||
sources:
|
||||
- type: git
|
||||
url: "https://github.com/stenzek/discord-rpc.git"
|
||||
commit: "144f3a3f1209994d8d9e8a87964a989cb9911c1e"
|
||||
cleanup:
|
||||
- /bin
|
||||
- /include
|
||||
- /lib/*.a
|
||||
- /lib/*.la
|
||||
- /lib/cmake
|
||||
- /lib/pkgconfig
|
||||
- /share
|
@ -1,30 +0,0 @@
|
||||
# SPDX-FileCopyrightText: 2019-2025 Connor McLaughlin <stenzek@gmail.com>
|
||||
# SPDX-License-Identifier: CC-BY-NC-ND-4.0
|
||||
|
||||
name: soundtouch
|
||||
buildsystem: cmake-ninja
|
||||
builddir: true
|
||||
config-opts:
|
||||
- "-DCMAKE_BUILD_TYPE=Release"
|
||||
|
||||
# Use clang with LTO for speed.
|
||||
- "-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON"
|
||||
- "-DCMAKE_C_COMPILER=/usr/lib/sdk/llvm19/bin/clang"
|
||||
- "-DCMAKE_CXX_COMPILER=/usr/lib/sdk/llvm19/bin/clang++"
|
||||
- "-DCMAKE_EXE_LINKER_FLAGS_INIT=-fuse-ld=lld"
|
||||
- "-DCMAKE_MODULE_LINKER_FLAGS_INIT=-fuse-ld=lld"
|
||||
- "-DCMAKE_SHARED_LINKER_FLAGS_INIT=-fuse-ld=lld"
|
||||
build-options:
|
||||
strip: true
|
||||
sources:
|
||||
- type: git
|
||||
url: "https://github.com/stenzek/soundtouch.git"
|
||||
commit: "463ade388f3a51da078dc9ed062bf28e4ba29da7"
|
||||
cleanup:
|
||||
- /bin
|
||||
- /include
|
||||
- /lib/*.a
|
||||
- /lib/*.la
|
||||
- /lib/cmake
|
||||
- /lib/pkgconfig
|
||||
- /share
|
@ -1,25 +0,0 @@
|
||||
# SPDX-FileCopyrightText: 2019-2025 Connor McLaughlin <stenzek@gmail.com>
|
||||
# SPDX-License-Identifier: CC-BY-NC-ND-4.0
|
||||
|
||||
name: plutosvg
|
||||
buildsystem: cmake-ninja
|
||||
builddir: true
|
||||
config-opts:
|
||||
- "-DCMAKE_BUILD_TYPE=Release"
|
||||
- "-DBUILD_SHARED_LIBS=ON"
|
||||
- "-DPLUTOSVG_ENABLE_FREETYPE=ON"
|
||||
- "-DPLUTOSVG_BUILD_EXAMPLES=OFF"
|
||||
build-options:
|
||||
strip: true
|
||||
sources:
|
||||
- type: git
|
||||
url: "https://github.com/stenzek/plutosvg.git"
|
||||
commit: "bc845bb6b6511e392f9e1097b26f70cf0b3c33be"
|
||||
cleanup:
|
||||
- /bin
|
||||
- /include
|
||||
- /lib/*.a
|
||||
- /lib/*.la
|
||||
- /lib/cmake
|
||||
- /lib/pkgconfig
|
||||
- /share
|
@ -1,27 +0,0 @@
|
||||
# SPDX-FileCopyrightText: 2019-2025 Connor McLaughlin <stenzek@gmail.com>
|
||||
# SPDX-License-Identifier: CC-BY-NC-ND-4.0
|
||||
|
||||
name: sdl3
|
||||
buildsystem: cmake-ninja
|
||||
builddir: true
|
||||
config-opts:
|
||||
- "-DCMAKE_BUILD_TYPE=Release"
|
||||
- "-DBUILD_SHARED_LIBS=ON"
|
||||
- "-DSDL_SHARED=ON"
|
||||
- "-DSDL_STATIC=OFF"
|
||||
- "-DSDL_TESTS=OFF"
|
||||
build-options:
|
||||
strip: false
|
||||
no-debuginfo: true
|
||||
sources:
|
||||
- type: archive
|
||||
url: "https://github.com/libsdl-org/SDL/releases/download/release-3.2.16/SDL3-3.2.16.tar.gz"
|
||||
sha256: "6340e58879b2d15830c8460d2f589a385c444d1faa2a4828a9626c7322562be8"
|
||||
cleanup:
|
||||
- /bin
|
||||
- /include
|
||||
- /lib/*.a
|
||||
- /lib/*.la
|
||||
- /lib/cmake
|
||||
- /lib/pkgconfig
|
||||
- /share/aclocal
|
@ -22,15 +22,29 @@ finish-args:
|
||||
|
||||
modules:
|
||||
# Dependencies.
|
||||
- "modules/10-libbacktrace.yaml"
|
||||
- "modules/11-libzip.yaml"
|
||||
- "modules/20-shaderc.yaml"
|
||||
- "modules/21-spirv-cross.yaml"
|
||||
- "modules/22-cpuinfo.yaml"
|
||||
- "modules/23-discord-rpc.yaml"
|
||||
- "modules/24-soundtouch.yaml"
|
||||
- "modules/25-plutosvg.yaml"
|
||||
- "modules/30-sdl3.yaml"
|
||||
- name: duckstation-deps
|
||||
buildsystem: simple
|
||||
sources:
|
||||
- type: file
|
||||
path: ../../deps/build-dependencies-linux.sh
|
||||
build-options:
|
||||
# Don't need debug info for deps, match AppImage.
|
||||
strip: true
|
||||
no-debuginfo: true
|
||||
|
||||
# Prevent flatpak defaults of fortify etc from creeping in.
|
||||
cflags: ""
|
||||
cflags-override: true
|
||||
cxxflags: ""
|
||||
cxxflags-override: true
|
||||
|
||||
# Need network access to download sources.
|
||||
build-args:
|
||||
- "--share=network"
|
||||
build-commands:
|
||||
- "./build-dependencies-linux.sh -system-freetype -system-harfbuzz -system-libjpeg -system-libpng -system-libwebp -system-zlib -system-zstd -system-qt /app/deps"
|
||||
cleanup:
|
||||
- "*"
|
||||
|
||||
# Main module.
|
||||
- name: duckstation
|
||||
@ -51,12 +65,19 @@ modules:
|
||||
# Flatpak build does not appear to default to Release.
|
||||
- "-DCMAKE_BUILD_TYPE=Release"
|
||||
|
||||
# Self-contained install, need to change the directory.
|
||||
# Typical flatpak garbage makes it a pain to change the path from /app/bin...
|
||||
- "-DCMAKE_INSTALL_PREFIX=/app/bin"
|
||||
|
||||
# Dependencies path.
|
||||
- "-DCMAKE_PREFIX_PATH=/app/deps"
|
||||
|
||||
# We're not running tests as part of the flatpak build.
|
||||
- "-DBUILD_TESTS=OFF"
|
||||
|
||||
# Install to /app/bin, use /app/lib for dependencies.
|
||||
# Install to /app.
|
||||
- "-DALLOW_INSTALL=ON"
|
||||
- "-DINSTALL_SELF_CONTAINED=OFF"
|
||||
- "-DINSTALL_SELF_CONTAINED=ON"
|
||||
|
||||
# Set the page range to 4K-16K. This has no effect on X86, but is required for
|
||||
# ARM builds, as some devices are now shipping with 16K kernels.
|
||||
|
@ -332,10 +332,7 @@ function(add_util_resources target)
|
||||
install_imported_dep_library(spirv-cross-c-shared)
|
||||
install_imported_dep_library(SoundTouch::SoundTouchDLL)
|
||||
install_imported_dep_library(plutosvg::plutosvg)
|
||||
else()
|
||||
# Prevent CMake from overriding the RPATH in the binary. i.e. use the build locations.
|
||||
# This is needed for Flatpak builds, since the libs are in /app.
|
||||
set_target_properties(${target} PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
install_imported_dep_library(libzip::zip)
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
Loading…
x
Reference in New Issue
Block a user