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 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)