From 3325d4ac824b3050362c3771062e59f34df4c1a0 Mon Sep 17 00:00:00 2001 From: Gauthier Quesnel Date: Tue, 2 Jul 2024 13:45:06 +0200 Subject: [PATCH] macos: fix pkgconfig environment variable --- .github/workflows/macos.yml | 2 +- CMakeLists.txt | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index ce39804..e5b0e1b 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -19,7 +19,7 @@ jobs: steps: - name: Checkout repository and submodule - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: recursive diff --git a/CMakeLists.txt b/CMakeLists.txt index 9a15587..b005a12 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,14 @@ if (UNIX) set(BUILD_SHARED_LIBS ON) endif() -find_package(expat CONFIG REQUIRED) +if (WIN32) + find_package(expat CONFIG REQUIRED) +else () + find_package(EXPAT REQUIRED) + add_library(expat::expat INTERFACE IMPORTED) + target_link_libraries(expat::expat INTERFACE EXPAT::EXPAT) +endif () + find_package(fmt CONFIG REQUIRED) find_package(Threads REQUIRED)