From 824b2b336f9dbb009a93fd7dbd195b09313ae4e9 Mon Sep 17 00:00:00 2001 From: Xiaofeng Yang Date: Thu, 21 Sep 2023 11:22:27 +0800 Subject: [PATCH 1/2] FIX: build failed due to hard-coded library path --- samples/sample_c++/platform/linux/manifold2/CMakeLists.txt | 2 +- samples/sample_c/platform/linux/manifold2/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/sample_c++/platform/linux/manifold2/CMakeLists.txt b/samples/sample_c++/platform/linux/manifold2/CMakeLists.txt index 3720e434..83e975e7 100644 --- a/samples/sample_c++/platform/linux/manifold2/CMakeLists.txt +++ b/samples/sample_c++/platform/linux/manifold2/CMakeLists.txt @@ -118,7 +118,7 @@ if (OPUS_FOUND) message(STATUS " - Libraries: ${OPUS_LIBRARY}") add_definitions(-DOPUS_INSTALLED) - target_link_libraries(${PROJECT_NAME} /usr/local/lib/libopus.a) + target_link_libraries(${PROJECT_NAME} opus) else () message(STATUS "Cannot Find OPUS") endif (OPUS_FOUND) diff --git a/samples/sample_c/platform/linux/manifold2/CMakeLists.txt b/samples/sample_c/platform/linux/manifold2/CMakeLists.txt index 65559744..51fe9873 100644 --- a/samples/sample_c/platform/linux/manifold2/CMakeLists.txt +++ b/samples/sample_c/platform/linux/manifold2/CMakeLists.txt @@ -65,7 +65,7 @@ if (OPUS_FOUND) message(STATUS " - Libraries: ${OPUS_LIBRARY}") add_definitions(-DOPUS_INSTALLED) - target_link_libraries(${PROJECT_NAME} /usr/local/lib/libopus.a) + target_link_libraries(${PROJECT_NAME} opus) else () message(STATUS "Cannot Find OPUS") endif (OPUS_FOUND) From 276bf02b3ae50b824f6f0e6ba19f60c03eca88f3 Mon Sep 17 00:00:00 2001 From: Xiaofeng Yang Date: Thu, 21 Sep 2023 11:23:01 +0800 Subject: [PATCH 2/2] FIX: build failed when using opencv4 --- .../test_flight_controller_command_flying.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/samples/sample_c++/module_sample/flight_controller/test_flight_controller_command_flying.cpp b/samples/sample_c++/module_sample/flight_controller/test_flight_controller_command_flying.cpp index f14eb15a..9c6c978b 100644 --- a/samples/sample_c++/module_sample/flight_controller/test_flight_controller_command_flying.cpp +++ b/samples/sample_c++/module_sample/flight_controller/test_flight_controller_command_flying.cpp @@ -38,6 +38,10 @@ #include "opencv2/opencv.hpp" #include "opencv2/highgui/highgui.hpp" +#if CV_MAJOR_VERSION >= 4 +#include "opencv2/imgproc/types_c.h" +#endif + using namespace cv; #endif