From 3a07fcbe47571e1a73d5683f5a0f581926e0c0fd Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Fri, 14 Feb 2025 17:58:15 -0800 Subject: [PATCH 1/4] Fixed MinGW with shared libs --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index fdac7583..b418a5c2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -581,6 +581,10 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|IntelLLVM") elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU") foreach(t IN LISTS TOOL_EXES ITEMS ${PROJECT_NAME}) target_compile_options(${t} PRIVATE "-Wno-ignored-attributes" "-Walloc-size-larger-than=4GB") + + if(BUILD_SHARED_LIBS) + target_compile_options(${t} PRIVATE "-Wno-attributes") + endif() endforeach() elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel") set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 14) From d308f6c93e6a5b664967ad4e5a4048504d09893c Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Fri, 14 Feb 2025 22:09:39 -0800 Subject: [PATCH 2/4] More DLL test --- .github/workflows/vcpkg.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/vcpkg.yml b/.github/workflows/vcpkg.yml index abf18547..05b21300 100644 --- a/.github/workflows/vcpkg.yml +++ b/.github/workflows/vcpkg.yml @@ -126,3 +126,15 @@ jobs: - name: 'Build' working-directory: ${{ github.workspace }} run: cmake --build out\build\${{ matrix.build_type }} + + - name: 'Clean up' + working-directory: ${{ github.workspace }} + run: Remove-Item -Path out -Recurse -Force + + - name: 'Configure CMake (DLL)' + working-directory: ${{ github.workspace }} + run: cmake --preset=${{ matrix.build_type }} -DBUILD_SHARED_LIBS=ON + + - name: 'Build (DLL)' + working-directory: ${{ github.workspace }} + run: cmake --build out\build\${{ matrix.build_type }} From 5717119b6027c1545e8725d0b119a7e303b2d741 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Fri, 14 Feb 2025 22:19:43 -0800 Subject: [PATCH 3/4] revert --- .github/workflows/vcpkg.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/vcpkg.yml b/.github/workflows/vcpkg.yml index 05b21300..abf18547 100644 --- a/.github/workflows/vcpkg.yml +++ b/.github/workflows/vcpkg.yml @@ -126,15 +126,3 @@ jobs: - name: 'Build' working-directory: ${{ github.workspace }} run: cmake --build out\build\${{ matrix.build_type }} - - - name: 'Clean up' - working-directory: ${{ github.workspace }} - run: Remove-Item -Path out -Recurse -Force - - - name: 'Configure CMake (DLL)' - working-directory: ${{ github.workspace }} - run: cmake --preset=${{ matrix.build_type }} -DBUILD_SHARED_LIBS=ON - - - name: 'Build (DLL)' - working-directory: ${{ github.workspace }} - run: cmake --build out\build\${{ matrix.build_type }} From 415a3cc96c9b7084f3e1b4d3e5679c61a331f874 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Fri, 14 Feb 2025 22:21:54 -0800 Subject: [PATCH 4/4] Try again --- .github/workflows/vcpkg.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/vcpkg.yml b/.github/workflows/vcpkg.yml index abf18547..2092d089 100644 --- a/.github/workflows/vcpkg.yml +++ b/.github/workflows/vcpkg.yml @@ -29,25 +29,40 @@ jobs: os: [windows-2019, windows-2022] build_type: [x64-Debug-VCPKG] arch: [amd64] + shared: [OFF] include: - os: windows-2022 build_type: x64-Debug-Clang-VCPKG arch: amd64 + shared: OFF - os: windows-2022 build_type: x86-Debug-VCPKG arch: amd64_x86 + shared: OFF - os: windows-2022 build_type: arm64-Debug-VCPKG arch: amd64_arm64 + shared: OFF - os: windows-2022 build_type: arm64ec-Debug-VCPKG arch: amd64_arm64 + shared: OFF - os: windows-2022 build_type: x64-Debug-MinGW arch: amd64 + shared: OFF - os: windows-2022 build_type: x64-Release-MinGW arch: amd64 + shared: OFF + - os: windows-2022 + build_type: x64-Debug-MinGW + arch: amd64 + shared: ON + - os: windows-2022 + build_type: x64-Release-MinGW + arch: amd64 + shared: ON steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -120,6 +135,7 @@ jobs: working-directory: ${{ github.workspace }} run: > cmake --preset=${{ matrix.build_type }} -DBUILD_TESTING=OFF -DENABLE_OPENEXR_SUPPORT=ON -DENABLE_LIBJPEG_SUPPORT=ON -DENABLE_LIBPNG_SUPPORT=ON + -DBUILD_SHARED_LIBS=${{ matrix.shared }} -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_MANIFEST_DIR="${{ github.workspace }}/build" -DVCPKG_TARGET_TRIPLET="${env:VCPKG_DEFAULT_TRIPLET}"