From 2108f7126bf177ddd9d1241abb223a16133bcf92 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Thu, 28 Dec 2023 10:06:47 +0100 Subject: [PATCH 1/2] disable building dynamic libraries on Windows --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1b4bf595..3eaf5ed4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,10 +2,12 @@ cmake_minimum_required(VERSION 3.1.2) project(matroska VERSION 2.0.0) +include(CMakeDependentOption) + option(DISABLE_PKGCONFIG "Disable PkgConfig module generation" OFF) option(DISABLE_CMAKE_CONFIG "Disable CMake package config module generation" OFF) -option(BUILD_SHARED_LIBS "Build libmatroska as a shared library" OFF) -option(BUILD_EXAMPLES "Build example code" OFF) +cmake_dependent_option(BUILD_SHARED_LIBS "Build libebml as a shared library (except Windows)" OFF "NOT WIN32" OFF) +option(BUILD_TESTING "Build tests" OFF) find_package(EBML 2.0.0 REQUIRED) From 07fd09bcaa6c8db706ef8e495ecc050df7254e9f Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Thu, 28 Dec 2023 10:07:53 +0100 Subject: [PATCH 2/2] CI: don't build Windows DLLs anymore --- .github/workflows/windows.yaml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/windows.yaml b/.github/workflows/windows.yaml index 3137f5bf..7aba45ce 100644 --- a/.github/workflows/windows.yaml +++ b/.github/workflows/windows.yaml @@ -7,16 +7,12 @@ on: jobs: build_libmatroska: - name: libmatroska ${{ matrix.arch.name }} ${{ matrix.config }} ${{ matrix.shared.name }} + name: libmatroska ${{ matrix.arch.name }} ${{ matrix.config }} runs-on: windows-latest strategy: fail-fast: false matrix: config: [Debug, Release] - shared: [ - { "name": "Dynamic", "option": "ON"}, - { "name": "Static", "option": "OFF"} - ] arch: [ { "name": "x64", "option": "x64"}, { "name": "x86", "option": "win32"}, @@ -30,16 +26,16 @@ jobs: - name: Get pushed code uses: actions/checkout@v3 - + - name: Checkout libebml uses: actions/checkout@v3 - with: + with: repository: Matroska-Org/libebml path: libebml # minimum version we support ref: 'release-1.4.3' - - name: Configure ${{ matrix.shared.name }} libebml - run: cmake -S libebml -B libebml/_build ${{ env.CMAKE_OPTIONS }} -A ${{ matrix.arch.option }} -DBUILD_SHARED_LIBS=${{ matrix.shared.option }} + - name: Configure libebml + run: cmake -S libebml -B libebml/_build ${{ env.CMAKE_OPTIONS }} -A ${{ matrix.arch.option }} - name: Build libebml run: cmake --build libebml/_build --config ${{ matrix.config }} --parallel @@ -47,8 +43,8 @@ jobs: - name: Install libebml run: cmake --install libebml/_build --config ${{ matrix.config }} --prefix ${GITHUB_WORKSPACE}/_built - - name: Configure ${{ matrix.shared.name }} library - run: cmake -S . -B _build ${{ env.CMAKE_OPTIONS }} ${{ env.CMAKE_MATROSKA_OPTIONS }} -A ${{ matrix.arch.option }} -DEBML_DIR="${GITHUB_WORKSPACE}/_built/lib/cmake/EBML" -DBUILD_SHARED_LIBS=${{ matrix.shared.option }} + - name: Configure library + run: cmake -S . -B _build ${{ env.CMAKE_OPTIONS }} ${{ env.CMAKE_MATROSKA_OPTIONS }} -A ${{ matrix.arch.option }} -DEBML_DIR="${GITHUB_WORKSPACE}/_built/lib/cmake/EBML" - name: Build run: cmake --build _build --config ${{ matrix.config }} --parallel