Skip to content

Commit

Permalink
#111 add ArucoDetector CMakeLists (not tested)
Browse files Browse the repository at this point in the history
  • Loading branch information
anacg1620 committed Jun 7, 2024
1 parent 45dcff5 commit fb6e782
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions libraries/YarpPlugins/ArucoDetector/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
if(NOT DEFINED ENABLE_ArucoDetector OR ENABLE_ArucoDetector)
if(NOT TARGET opencv_objdetect)
message(WARNING "OpenCV objdetect module not found, disabling ArucoDetector device")
elseif(NOT YARP_cv_FOUND)
message(WARNING "YARP_cv package not found, disabling ArucoDetector device")
endif()

yarp_prepare_plugin(ArucoDetector
CATEGORY device
TYPE roboticslab::ArucoDetector
INCLUDE ArucoDetector.hpp
DEFAULT ON
DEPENDS "TARGET opencv_objdetect;YARP_cv_FOUND")

if(NOT SKIP_ArucoDetector)

yarp_add_plugin(ArucoDetector ArucoDetector.hpp
ArucoDetector.cpp)

target_link_libraries(ArucoDetector YARP::YARP_os
YARP::YARP_dev
YARP::YARP_cv
opencv_objdetect
ROBOTICSLAB::VisionInterfaces)

yarp_install(TARGETS ArucoDetector
LIBRARY DESTINATION ${ROBOTICSLAB-VISION_DYNAMIC_PLUGINS_INSTALL_DIR}
ARCHIVE DESTINATION ${ROBOTICSLAB-VISION_STATIC_PLUGINS_INSTALL_DIR}
YARP_INI DESTINATION ${ROBOTICSLAB-VISION_PLUGIN_MANIFESTS_INSTALL_DIR})

else()

set(ENABLE_ArucoDetector OFF CACHE BOOL "Enable/disable ArucoDetector device" FORCE)

endif()

0 comments on commit fb6e782

Please sign in to comment.