Skip to content
Snippets Groups Projects
Commit 1e142f67 authored by Mederic Fourmy's avatar Mederic Fourmy
Browse files

Fix: Link with OpenCV using COMPONENTS

parent bcaa84ec
No related branches found
No related tags found
2 merge requests!36After cmake and const refactor,!33Resolve "Adapt to core CMakeLists.txt refactor"
...@@ -83,8 +83,10 @@ option(_WOLF_TRACE "Enable wolf tracing macro" ON) ...@@ -83,8 +83,10 @@ option(_WOLF_TRACE "Enable wolf tracing macro" ON)
# ============ DEPENDENCIES ================== # ============ DEPENDENCIES ==================
FIND_PACKAGE(wolfcore REQUIRED) FIND_PACKAGE(wolfcore REQUIRED)
SET(PRINT_INFO_VU false) FIND_PACKAGE(OpenCV REQUIRED
FIND_PACKAGE(OpenCV REQUIRED) COMPONENTS core imgcodecs highgui features2d calib3d video
)
# ============ config.h ================== # ============ config.h ==================
string(TOUPPER ${PROJECT_NAME} UPPER_NAME) string(TOUPPER ${PROJECT_NAME} UPPER_NAME)
...@@ -184,10 +186,29 @@ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") ...@@ -184,10 +186,29 @@ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# using GCC # using GCC
endif() endif()
#Link the created libraries # Link the created libraries
#===============EXAMPLE========================= #===============EXAMPLE=========================
TARGET_LINK_LIBRARIES(${PLUGIN_NAME} wolfcore) TARGET_LINK_LIBRARIES(${PLUGIN_NAME} wolfcore)
TARGET_LINK_LIBRARIES(${PLUGIN_NAME} OpenCV) # For OpenCV, link with respect to each required components, found in the find_package command
# The required components have the same name as the include files e.g. <opencv2/core.hpp>
# or the opencv2 subdirectory in which they are found, e.g. <opencv2/video/tracking.hpp>
TARGET_LINK_LIBRARIES(${PLUGIN_NAME}
opencv_core
opencv_imgcodecs
opencv_highgui
opencv_features2d
opencv_calib3d
opencv_video
)
# # TARGET_LINK_LIBRARIES(${PLUGIN_NAME} opencv)
# get_target_property(toto wolfcore INCLUDE_DIRECTORIES)
# message(WARNING ${toto})
# get_target_property(toto wolfcore INTERFACE_INCLUDE_DIRECTORIES)
# message(WARNING ${toto})
# get_target_property(toto wolfcore INTERFACE_SYSTEM_INCLUDE_DIRECTORIES)
# message(WARNING ${toto})
#Build demos #Build demos
#===============EXAMPLE========================= #===============EXAMPLE=========================
......
...@@ -99,15 +99,9 @@ inline FactorPixelHp::FactorPixelHp(const FeatureBasePtr& _ftr_ptr, ...@@ -99,15 +99,9 @@ inline FactorPixelHp::FactorPixelHp(const FeatureBasePtr& _ftr_ptr,
inline Eigen::VectorXd FactorPixelHp::expectation() const inline Eigen::VectorXd FactorPixelHp::expectation() const
{ {
<<<<<<< HEAD
FrameBasePtr frm = getFeature()->getCapture()->getFrame();
SensorBasePtr sen = getFeature()->getCapture()->getSensor();
LandmarkBasePtr lmk = getLandmarkOther();
=======
auto frm = getFeature()->getCapture()->getFrame(); auto frm = getFeature()->getCapture()->getFrame();
auto sen = getFeature()->getCapture()->getSensor(); auto sen = getFeature()->getCapture()->getSensor();
auto lmk = getLandmarkOther(); auto lmk = getLandmarkOther();
>>>>>>> devel
const Eigen::MatrixXd frame_pos = frm->getP()->getState(); const Eigen::MatrixXd frame_pos = frm->getP()->getState();
const Eigen::MatrixXd frame_ori = frm->getO()->getState(); const Eigen::MatrixXd frame_ori = frm->getO()->getState();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment