From 2a906123878fc68f5bb92e8327f7c9f23758f6f7 Mon Sep 17 00:00:00 2001 From: pifopi Date: Sun, 18 May 2025 14:34:46 +0200 Subject: [PATCH] Fix MAC CI --- .github/workflows/cpp-ci-serial-programs.yml | 2 +- SerialPrograms/CMakeLists.txt | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cpp-ci-serial-programs.yml b/.github/workflows/cpp-ci-serial-programs.yml index 565029c424..35b91b8de8 100644 --- a/.github/workflows/cpp-ci-serial-programs.yml +++ b/.github/workflows/cpp-ci-serial-programs.yml @@ -36,7 +36,7 @@ jobs: - name: Install dependencies if: startsWith(matrix.os, 'mac') run: | - brew install opencv + brew install opencv onnxruntime - uses: jurplel/install-qt-action@v4 with: version: ${{ matrix.qt_version }} diff --git a/SerialPrograms/CMakeLists.txt b/SerialPrograms/CMakeLists.txt index 22b5ae3dd8..55a05967ee 100644 --- a/SerialPrograms/CMakeLists.txt +++ b/SerialPrograms/CMakeLists.txt @@ -2399,9 +2399,11 @@ if (MSVC) # target_compile_options(SerialPrograms PRIVATE /arch:AVX512 /DPA_Arch_x64_AVX512) # target_compile_options(SerialPrograms PRIVATE /arch:AVX512 /DPA_Arch_x64_AVX512GF) else() + execute_process(COMMAND brew --prefix OUTPUT_VARIABLE HOMEBREW_PREFIX OUTPUT_STRIP_TRAILING_WHITESPACE) + # Find ONNX Runtime - target_include_directories(SerialPrograms PRIVATE /opt/homebrew/include/onnxruntime) - target_link_libraries(SerialPrograms PRIVATE /opt/homebrew/lib/libonnxruntime.dylib) + target_include_directories(SerialPrograms PRIVATE ${HOMEBREW_PREFIX}/include/onnxruntime) + target_link_libraries(SerialPrograms PRIVATE ${HOMEBREW_PREFIX}/lib/libonnxruntime.dylib) # Find OpenCV