From 291a98ea9765c3b04659aebf9f21f8c8f29ceda3 Mon Sep 17 00:00:00 2001 From: Gary Wang Date: Sat, 24 May 2025 23:19:26 +0800 Subject: [PATCH] fix(CI): macOS and Ubuntu CI FTBFS macOS's CI uses conan to build exiv2, which seems still rely on the exiv2lib target... --- .github/workflows/ubuntu.yml | 2 +- CMakeLists.txt | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 2828371..5ab66b4 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -15,7 +15,7 @@ jobs: run: | mkdir build cd build - cmake ../ -DPREFER_QT_5=OFF + cmake ../ make cpack -G DEB - name: Try install it diff --git a/CMakeLists.txt b/CMakeLists.txt index 6defccb..0f0c51d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -121,6 +121,10 @@ target_sources(${EXE_NAME} PRIVATE ${PPIC_QM_FILES}) target_link_libraries (${EXE_NAME} Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Svg Qt${QT_VERSION_MAJOR}::SvgWidgets) if (exiv2_FOUND) + if(NOT TARGET Exiv2::exiv2lib AND TARGET exiv2lib) + # for exiv2 0.27.x and (macOS?) conan build + add_library(Exiv2::exiv2lib ALIAS exiv2lib) + endif() target_link_libraries (${EXE_NAME} Exiv2::exiv2lib )