Skip to content

Commit 20b9242

Browse files
committed
Pass handling of CMake dependent options to yarp_prepare_plugin
1 parent b4c29ab commit 20b9242

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

libraries/YarpPlugins/ColorRegionDetector/CMakeLists.txt

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@ if(NOT YARP_cv_FOUND AND (NOT DEFINED ENABLE_ColorRegionDetector OR ENABLE_Color
22
message(WARNING "YARP_cv package not found, disabling ColorRegionDetector device")
33
endif()
44

5-
cmake_dependent_option(ENABLE_ColorRegionDetector "Enable/disable ColorRegionDetector" ON
6-
"ENABLE_TravisLib;YARP_cv_FOUND" OFF)
7-
85
yarp_prepare_plugin(ColorRegionDetector
96
CATEGORY device
107
TYPE roboticslab::ColorRegionDetector
118
INCLUDE ColorRegionDetector.hpp
12-
DEFAULT ON)
9+
DEFAULT ON
10+
DEPENDS "ENABLE_TravisLib;YARP_cv_FOUND")
1311

1412
if(NOT SKIP_ColorRegionDetector)
1513

libraries/YarpPlugins/HaarDetector/CMakeLists.txt

+2-4
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,12 @@ if(NOT DEFINED ENABLE_HaarDetector OR ENABLE_HaarDetector)
66
endif()
77
endif()
88

9-
cmake_dependent_option(ENABLE_HaarDetector "Enable/disable HaarDetector" ON
10-
"OpenCV_FOUND;YARP_cv_FOUND" OFF)
11-
129
yarp_prepare_plugin(HaarDetector
1310
CATEGORY device
1411
TYPE roboticslab::HaarDetector
1512
INCLUDE HaarDetector.hpp
16-
DEFAULT ON)
13+
DEFAULT ON
14+
DEPENDS "OpenCV_FOUND;YARP_cv_FOUND")
1715

1816
if(NOT SKIP_HaarDetector)
1917

libraries/YarpPlugins/QRDetector/CMakeLists.txt

+2-4
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,12 @@ if(NOT DEFINED ENABLE_QRDetector OR ENABLE_QRDetector)
66
endif()
77
endif()
88

9-
cmake_dependent_option(QRDetector "Enable/disable QRDetector" ON
10-
"OpenCV_VERSION_MAJOR EQUAL 4;YARP_cv_FOUND" OFF)
11-
129
yarp_prepare_plugin(QRDetector
1310
CATEGORY device
1411
TYPE roboticslab::QRDetector
1512
INCLUDE QRDetector.hpp
16-
DEFAULT ON)
13+
DEFAULT ON
14+
DEPENDS "OpenCV_VERSION_MAJOR EQUAL 4;YARP_cv_FOUND")
1715

1816
if(NOT SKIP_QRDetector)
1917

0 commit comments

Comments
 (0)