From f306105bd87ed2992c0fb431e5723d3b1d323549 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=86=E2=9C=A0Sa=CD=A5b=CD=A3e=CD=ABr=F0=9F=91=91?= =?UTF-8?q?=E2=B0=80?= Date: Sun, 21 Sep 2025 20:58:52 +0800 Subject: [PATCH 1/2] Fixes Common/Cpp/StringTools.h --- Common/Cpp/StringTools.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Common/Cpp/StringTools.h b/Common/Cpp/StringTools.h index a5c42f1520..d4e6507a83 100644 --- a/Common/Cpp/StringTools.h +++ b/Common/Cpp/StringTools.h @@ -8,6 +8,7 @@ #define PokemonAutomation_StringTools_H #include +#include namespace PokemonAutomation{ namespace StringTools{ From 39348daf246b33dd623f334b618ba51218e3e860 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=86=E2=9C=A0Sa=CD=A5b=CD=A3e=CD=ABr=F0=9F=91=91?= =?UTF-8?q?=E2=B0=80?= Date: Sun, 21 Sep 2025 20:55:56 +0800 Subject: [PATCH 2/2] cmake: fixes opencv package path on macos --- SerialPrograms/CMakeLists.txt | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/SerialPrograms/CMakeLists.txt b/SerialPrograms/CMakeLists.txt index c3fb86e5f9..79eae532e4 100644 --- a/SerialPrograms/CMakeLists.txt +++ b/SerialPrograms/CMakeLists.txt @@ -2614,6 +2614,12 @@ else() # macOS and Linux target_include_directories(SerialPrograms PRIVATE ${HOMEBREW_PREFIX}/include/onnxruntime) target_link_libraries(SerialPrograms PRIVATE ${HOMEBREW_PREFIX}/lib/libonnxruntime.dylib) endif() + # Find OpenCV + if(CMAKE_SYSTEM_PROCESSOR MATCHES "(arm64)|(ARM64)") + find_package(OpenCV REQUIRED HINTS "/opt/homebrew/opt/opencv/lib/cmake/opencv4/") + else() + find_package(OpenCV REQUIRED HINTS "/usr/local/opt/opencv/lib/cmake/opencv4/") + endif() else() # Linux # Instructions took from https://github.com/microsoft/onnxruntime/discussions/6489 @@ -2646,13 +2652,10 @@ else() # macOS and Linux # Link against ONNX Runtime target_link_libraries(SerialPrograms PRIVATE onnxruntime) + # Find OpenCV + find_package(OpenCV REQUIRED HINTS "/usr/local/opt/opencv/lib/cmake/opencv4/") endif() - # Find OpenCV - # set(OPENCV_DIR, "/usr/local/opt/opencv/lib/cmake/opencv4") - find_package(OpenCV REQUIRED HINTS "/usr/local/opt/opencv/lib/cmake/opencv4/") - # set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/opt/opencv/lib/pkgconfig") - # pkg_search_module(OPENCV REQUIRED opencv) include_directories(${OpenCV_INCLUDE_DIRS}) link_directories(${OpenCV_LIBRARY_DIRS}) target_link_libraries(SerialPrograms PRIVATE ${OpenCV_LIBS})