Skip to content

Commit

Permalink
Place YARP-related lines in root CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterBowman committed Apr 13, 2018
1 parent 9422452 commit 1de27a1
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 33 deletions.
15 changes: 14 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,23 @@ set_property(GLOBAL PROPERTY ROBOTICSLAB_VISION_TARGETS)
# Create targets if specific requirements are satisfied.
include(CMakeDependentOption)

# Find YARP (main dependency).
find_package(YARP REQUIRED)

# Load YARP modules.
if(YARP_VERSION_SHORT VERSION_LESS 2.3.70)
list(APPEND CMAKE_MODULE_PATH ${YARP_MODULE_PATH})
include(YarpPlugin)
include(YarpInstallationHelpers)
endif()

# Configure installation paths for YARP resources.
yarp_configure_external_installation(roboticslab-vision)

# Add main contents.
add_subdirectory(share)
add_subdirectory(libraries)
add_subdirectory(programs)
add_subdirectory(share)

# Store the package in the user registry.
export(PACKAGE ROBOTICSLAB_VISION)
Expand Down
5 changes: 0 additions & 5 deletions libraries/YarpPlugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,7 @@ option(ENABLE_YarpPlugins "Enable/disable YarpPlugins" OFF)

if(ENABLE_YarpPlugins)

# Find YARP (common dependency for all devices).
find_package(YARP REQUIRED)

if(YARP_VERSION_SHORT VERSION_LESS 2.3.70)
list(APPEND CMAKE_MODULE_PATH ${YARP_MODULE_PATH})
include(YarpPlugin)
include_directories(${YARP_INCLUDE_DIRS})
endif()

Expand Down
7 changes: 4 additions & 3 deletions programs/colorRegionDetection/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ cmake_dependent_option(ENABLE_colorRegionDetection "Enable/disable colorRegionDe

if(ENABLE_colorRegionDetection)

find_package(YARP REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})

include_directories(${YARP_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS})
if(YARP_VERSION_SHORT VERSION_LESS 2.3.70)
include_directories(${YARP_INCLUDE_DIRS})
endif()

add_executable(colorRegionDetection main.cpp
ColorRegionDetection.hpp
Expand Down
7 changes: 4 additions & 3 deletions programs/colorRegionDetection2D/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ cmake_dependent_option(ENABLE_colorRegionDetection2D "Enable/disable colorRegion

if(ENABLE_colorRegionDetection2D)

find_package(YARP REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})

include_directories(${YARP_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS})
if(YARP_VERSION_SHORT VERSION_LESS 2.3.70)
include_directories(${YARP_INCLUDE_DIRS})
endif()

add_executable(colorRegionDetection2D main.cpp
SegmentorThread.cpp
Expand Down
7 changes: 4 additions & 3 deletions programs/haarDetection/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ cmake_dependent_option(ENABLE_haarDetection "Enable/disable haarDetection progra

if(ENABLE_haarDetection)

find_package(YARP REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})

include_directories(${YARP_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS})
if(YARP_VERSION_SHORT VERSION_LESS 2.3.70)
include_directories(${YARP_INCLUDE_DIRS})
endif()

add_executable(haarDetection main.cpp
HaarDetection.hpp
Expand Down
7 changes: 4 additions & 3 deletions programs/haarDetection2D/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ cmake_dependent_option(ENABLE_haarDetection2D "Enable/disable haarDetection2D pr

if(ENABLE_haarDetection2D)

find_package(YARP REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})

include_directories(${YARP_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS})
if(YARP_VERSION_SHORT VERSION_LESS 2.3.70)
include_directories(${YARP_INCLUDE_DIRS})
endif()

add_executable(haarDetection2D main.cpp
HaarDetection2D.hpp
Expand Down
6 changes: 3 additions & 3 deletions programs/kinectPxToReal/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ option(ENABLE_kinectPxToReal "Enable/disable kinectPxToReal program" ON)

if(ENABLE_kinectPxToReal)

find_package(YARP REQUIRED)

include_directories(${YARP_INCLUDE_DIRS})
if(YARP_VERSION_SHORT VERSION_LESS 2.3.70)
include_directories(${YARP_INCLUDE_DIRS})
endif()

add_executable(kinectPxToReal main.cpp
KinectPxToReal.hpp
Expand Down
9 changes: 5 additions & 4 deletions programs/pointAtObjectServer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ cmake_dependent_option(ENABLE_pointAtObjectServer "Enable/disable pointAtObjectS

if(ENABLE_pointAtObjectServer)

find_package(YARP REQUIRED)

include_directories(${YARP_INCLUDE_DIRS}
${PCL_INCLUDE_DIRS})
include_directories(${PCL_INCLUDE_DIRS})

link_directories(${PCL_LIBRARY_DIRS})

if(YARP_VERSION_SHORT VERSION_LESS 2.3.70)
include_directories(${YARP_INCLUDE_DIRS})
endif()

add_executable(pointAtObjectServer main.cpp
PointAtObjectServer.hpp
PointAtObjectServer.cpp
Expand Down
6 changes: 3 additions & 3 deletions programs/voxelOccupancyDetection/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ option(ENABLE_voxelOccupancyDetection "Enable/disable voxelOccupancyDetection pr

if(ENABLE_voxelOccupancyDetection)

find_package(YARP REQUIRED)

include_directories(${YARP_INCLUDE_DIRS})
if(YARP_VERSION_SHORT VERSION_LESS 2.3.70)
include_directories(${YARP_INCLUDE_DIRS})
endif()

add_executable(voxelOccupancyDetection main.cpp
VoxelOccupancyDetection.hpp
Expand Down
5 changes: 0 additions & 5 deletions share/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
# Author: Juan G Victores
# CopyPolicy: Released under the terms of the GNU GPL v2.0.

find_package(YARP REQUIRED)
list(APPEND CMAKE_MODULE_PATH ${YARP_MODULE_PATH})
include(YarpInstallationHelpers)
yarp_configure_external_installation(roboticslab-vision)

yarp_install(FILES ymanager.ini
DESTINATION ${ROBOTICSLAB-VISION_DATA_INSTALL_DIR})

Expand Down

0 comments on commit 1de27a1

Please sign in to comment.