diff --git a/.github/workflows/snapshots.yml b/.github/workflows/snapshots.yml index 4a404607..af492542 100644 --- a/.github/workflows/snapshots.yml +++ b/.github/workflows/snapshots.yml @@ -161,11 +161,11 @@ jobs: # Upload continuous build upload: - if: ${{ false }} # disable for now name: '🗂 Create release and upload artifacts' needs: - build-linux - build-mac + - build-windows runs-on: ubuntu-20.04 steps: - name: '⚙️ Install dependencies' diff --git a/CMakeLists.txt b/CMakeLists.txt index 7f9be309..192c8655 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -121,14 +121,14 @@ target_link_libraries(BandageIo PRIVATE Qt6::Gui Qt6::Widgets foonathan::lexy) # FIXME: Untagle this add_library(BandageLib STATIC ${LIB_SOURCES} ${FORMS} graphsearch/graphsearchers.cpp) -target_link_libraries(BandageLib PRIVATE BandageLayout BandageIo Qt6::Concurrent Qt6::Widgets Qt6::Svg zlibstatic) +target_link_libraries(BandageLib PRIVATE BandageLayout BandageIo Qt6::Concurrent Qt6::Widgets Qt6::Svg ${bandage_zlib}) target_include_directories(BandageLib INTERFACE ".") add_library(BandageCLI STATIC ${CLI_SOURCES}) target_link_libraries(BandageCLI PRIVATE BandageLib CLI11::CLI11 Qt6::Core Qt6::Gui Qt6::Widgets Qt6::Svg) add_executable(BandageNG program/main.cpp ${RESOURCES}) -target_link_libraries(BandageNG BandageCLI BandageLib CLI11::CLI11 Qt6::Core Qt6::Widgets Qt6::Concurrent zlibstatic) +target_link_libraries(BandageNG BandageCLI BandageLib CLI11::CLI11 Qt6::Core Qt6::Widgets Qt6::Concurrent ${bandage_zlib}) if (APPLE) set_target_properties(BandageNG PROPERTIES diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index 32506bd5..b22e7afa 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -5,12 +5,20 @@ FetchContent_Declare(ogdf EXCLUDE_FROM_ALL) FetchContent_MakeAvailable(ogdf) -set(SKIP_INSTALL_ALL ON) -set(ZLIB_COMPAT ON) -set(WITH_GTEST OFF) -set(ZLIB_ENABLE_TESTS OFF) -set(ZLIBNG_ENABLE_TESTS OFF) -FetchContent_Declare(zlib_ng - SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/zlib-ng" - EXCLUDE_FROM_ALL) -FetchContent_MakeAvailable(zlib_ng) +# zlib-ng does not support universal builds, +# resort to system one +if (CMAKE_OSX_ARCHITECTURES) + find_package(ZLIB REQUIRED) + set(bandage_zlib ${ZLIB_LIBRARIES} PARENT_SCOPE) +else() + set(SKIP_INSTALL_ALL ON) + set(ZLIB_COMPAT ON) + set(WITH_GTEST OFF) + set(ZLIB_ENABLE_TESTS OFF) + set(ZLIBNG_ENABLE_TESTS OFF) + FetchContent_Declare(zlib_ng + SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/zlib-ng" + EXCLUDE_FROM_ALL) + FetchContent_MakeAvailable(zlib_ng) + set(bandage_zlib zlibstatic PARENT_SCOPE) +endif()