Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
uses: actions/checkout@v5
with:
submodules: recursive
fetch-depth: 0 # Ensures all tags are fetched

- name: 🔧 Prepare
shell: bash
Expand Down Expand Up @@ -85,9 +86,11 @@ jobs:
-e LANG="C.UTF-8" \
-e LC_ALL="C.UTF-8" \
ghcr.io/hyperion-project/debian:${{ env.DOCKER_TAG }} \
/bin/bash -c "cmake --preset linux-${{ env.BUILD_TYPE }} ${{ steps.dependencies.outputs.cmakeArgs }} -DPLATFORM=${{ matrix.os.platform }} ${{ env.CPACK_SYSTEM_PROCESSOR }} &&
cmake --build --preset linux-${{ env.BUILD_TYPE }} --target package &&
cp /source/build/Hyperion-* /deploy/ 2>/dev/null"
/bin/bash -c "
git config --global --add safe.directory /source &&
cmake --preset linux-${{ env.BUILD_TYPE }} ${{ steps.dependencies.outputs.cmakeArgs }} -DPLATFORM=${{ matrix.os.platform }} ${{ env.CPACK_SYSTEM_PROCESSOR }} &&
cmake --build --preset linux-${{ env.BUILD_TYPE }} --target package &&
cp /source/build/Hyperion-* /deploy/ 2>/dev/null"
env:
DOCKER_TAG: ${{ inputs.codename == 'bullseye' && matrix.os.architecture[0] == 'armv6' && inputs.codename || format('{0}-qt6', inputs.codename) }}
BUILD_TYPE: ${{ inputs.event_name == 'pull_request' && 'debug' || 'release' }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ jobs:
- name: ⬇ Checkout
uses: actions/checkout@v5
with:
submodules: recursive
submodules: recursive
fetch-depth: 0 # Ensures all tags are fetched

- name: 🔧 Prepare
shell: bash
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
uses: actions/checkout@v5
with:
submodules: recursive
fetch-depth: 0 # Ensures all tags are fetched

- name: 🔧 Prepare
shell: bash
Expand Down
21 changes: 18 additions & 3 deletions dependencies/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,10 @@ if(ENABLE_PROTOBUF_SERVER)
endif()

if(NOT USE_SYSTEM_PROTO_LIBS)

# Enable ProtoBuf verbose mode
set(protobuf_VERBOSE OFF CACHE BOOL "Build protobuf verbose")

# Build Protobuf as static library
set(protobuf_BUILD_SHARED_LIBS OFF CACHE BOOL "Build protobuf shared")

Expand All @@ -433,8 +437,11 @@ if(ENABLE_PROTOBUF_SERVER)
# Disable build of Protobuf with zlib support
set(protobuf_WITH_ZLIB OFF CACHE BOOL "Build protobuf with zlib support")

# Disable build of libupb
set(protobuf_BUILD_LIBUPB OFF CACHE BOOL "Build libupb")
# Enable build of libupb
set(protobuf_BUILD_LIBUPB ON CACHE BOOL "Build libupb")

# Force all dependencies to be downloaded from GitHub
set(protobuf_FORCE_FETCH_DEPENDENCIES ON CACHE INTERNAL "Force all dependencies to be downloaded from GitHub")

# Build abeil (3rd party sub-module) with C++ version requirements
set(ABSL_PROPAGATE_CXX_STD ON CACHE BOOL "Build abseil-cpp with C++ version requirements propagated")
Expand All @@ -458,8 +465,15 @@ if(ENABLE_PROTOBUF_SERVER)
set(protobuf_BUILD_PROTOC_BINARIES OFF CACHE BOOL "Build protobuf libraries and protoc compiler")
endif()

include(FetchContent)

# Add Protobuf directory to the build
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/external/protobuf")
FetchContent_Declare(
protobuf
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/external/protobuf"
PATCH_COMMAND git apply "${CMAKE_CURRENT_SOURCE_DIR}/patch/protobuf/atomic.diff"
)
FetchContent_MakeAvailable(protobuf)

if(CMAKE_CROSSCOMPILING)
if(IMPORT_PROTOC)
Expand All @@ -472,6 +486,7 @@ if(ENABLE_PROTOBUF_SERVER)
PREFIX ${CMAKE_BINARY_DIR}/dependencies/external/protoc-host
BUILD_ALWAYS OFF
DOWNLOAD_COMMAND ""
PATCH_COMMAND git apply "${CMAKE_CURRENT_SOURCE_DIR}/patch/protobuf/atomic.diff"
INSTALL_COMMAND ""
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external/protobuf
CMAKE_ARGS -Dprotobuf_BUILD_LIBPROTOC:BOOL=OFF
Expand Down
2 changes: 1 addition & 1 deletion dependencies/external/protobuf
Submodule protobuf updated 1979 files
15 changes: 15 additions & 0 deletions dependencies/patch/protobuf/atomic.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/cmake/protobuf-configure-target.cmake b/cmake/protobuf-configure-target.cmake
index c67c57056..171e0a8f0 100644
--- a/cmake/protobuf-configure-target.cmake
+++ b/cmake/protobuf-configure-target.cmake
@@ -7,8 +7,8 @@

# Refactors configuration options set on all Protobuf targets
function(protobuf_configure_target target)
- if(protobuf_LINK_LIBATOMIC)
- target_link_libraries(libprotobuf PRIVATE atomic)
+ if(protobuf_LINK_LIBATOMIC AND "${target}" STREQUAL "libprotobuf")
+ target_link_libraries("${target}" PRIVATE atomic)
endif()

target_compile_features("${target}" PUBLIC cxx_std_17)
Loading