Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Common/Cpp/StringTools.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#define PokemonAutomation_StringTools_H

#include <string>
#include <vector>

namespace PokemonAutomation{
namespace StringTools{
Expand Down
13 changes: 8 additions & 5 deletions SerialPrograms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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})
Expand Down