-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#111 add ArucoDetector CMakeLists (not tested)
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |