From 1a8837f321c2e33c2153556ada371f2aebb21b9c Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Mon, 31 Aug 2026 14:57:42 +0200 Subject: [PATCH 1/2] CMake: remove bogus BUILD_SHARED_LIBS dependent option When forcing BUILD_SHARED_LIBS=ON on Windows it still defaults to OFF. And it was always OFF by default regardless of the platform anyway. --- CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 77ca7a75..f2c9a421 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,8 +2,6 @@ cmake_minimum_required(VERSION 3.5) project(ebml VERSION 1.4.7) -include(CMakeDependentOption) - include( FeatureSummary ) function(feature_info_on_off) set(option_name ${ARGV0}) @@ -14,7 +12,7 @@ function(feature_info_on_off) endif() endfunction(feature_info_on_off) -cmake_dependent_option(BUILD_SHARED_LIBS "Build libebml as a shared library (except Windows)" OFF "NOT WIN32" OFF) +option(BUILD_SHARED_LIBS "Build libebml as a shared library (except Windows)" OFF) feature_info_on_off(BUILD_SHARED_LIBS "will build as a dynamic library" "will build as a static library") option(DISABLE_PKGCONFIG "Disable PkgConfig module generation" OFF) From c08653c1a06e9705bf561fcbc54847241de1e474 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Mon, 31 Aug 2026 15:05:47 +0200 Subject: [PATCH 2/2] CI: build static and share Windows libraries --- .github/workflows/windows.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/windows.yaml b/.github/workflows/windows.yaml index 34cb7d9b..d686a101 100644 --- a/.github/workflows/windows.yaml +++ b/.github/workflows/windows.yaml @@ -7,18 +7,23 @@ on: jobs: build_libebml: - name: ${{ matrix.config }} libebml for Windows + name: ${{ matrix.config }} libebml for Windows (${{ matrix.lib.name }}) runs-on: windows-latest strategy: fail-fast: false matrix: config: [Debug, Release] + lib: [ + { "name": "static", "option": "-DBUILD_SHARED_LIBS=OFF"}, + { "name": "shared", "option": "-DBUILD_SHARED_LIBS=ON"}, + { "name": "auto", "option": ""}, + ] steps: - name: Get pushed code uses: actions/checkout@v7 - name: Configure CMake - run: cmake -S . -B _build -DCMAKE_INSTALL_PREFIX:STRING=${GITHUB_WORKSPACE}/_built -G Ninja + run: cmake -S . -B _build ${{ matrix.lib.option }} -DCMAKE_INSTALL_PREFIX:STRING=${GITHUB_WORKSPACE}/_built -G Ninja - name: Build with CMake run: cmake --build _build --config ${{ matrix.config }} --parallel