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 Mar 23, 2018
1 parent 9bc689c commit 5aaa3e9
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 23 deletions.
15 changes: 14 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,27 @@ set_property(GLOBAL PROPERTY ROBOTICSLAB_KINEMATICS_DYNAMICS_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-kinematics-dynamics)

# Dependency-related tweaks.
set(_target_kdl_version 1.4)

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

# Store the package in the user registry.
export(PACKAGE ROBOTICSLAB_KINEMATICS_DYNAMICS)
Expand Down
5 changes: 0 additions & 5 deletions libraries/YarpPlugins/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
# Copyright: (C) 2013 Universidad Carlos III de Madrid
# Authors: Juan G. Victores

# 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
2 changes: 0 additions & 2 deletions libraries/YarpTinyMathLib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
find_package(YARP QUIET) # populate YARP_HAS_MATH_LIB variable

if(NOT YARP_HAS_MATH_LIB AND (NOT DEFINED ENABLE_YarpTinyMathLib OR ENABLE_YarpTinyMathLib))
message(WARNING "YARP math lib not found, disabling YarpTinyMathLib")
endif()
Expand Down
7 changes: 3 additions & 4 deletions programs/keyboardController/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ cmake_dependent_option(ENABLE_keyboardController "Enable/disable keyboardControl

if(ENABLE_keyboardController)

# Find YARP.
find_package(YARP REQUIRED)

# Include any directories needed for this target.
include_directories(${YARP_INCLUDE_DIRS})
if(YARP_VERSION_SHORT VERSION_LESS 2.3.70)
include_directories(${YARP_INCLUDE_DIRS})
endif()

# Set up our main executable.
add_executable(keyboardController main.cpp
Expand Down
2 changes: 0 additions & 2 deletions programs/streamingDeviceController/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ cmake_dependent_option(ENABLE_streamingDeviceController "Enable/disable streamin

if(ENABLE_streamingDeviceController)

find_package(YARP REQUIRED)

find_package(ROBOTICSLAB_YARP_DEVICES QUIET)

# Include any directories needed for this target.
Expand Down
2 changes: 0 additions & 2 deletions programs/transCoords/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ cmake_dependent_option(ENABLE_transCoords "Enable/disable transCoords program" O

if(ENABLE_transCoords)

find_package(YARP REQUIRED)

# Include any directories needed for this target.
include_directories(${YARP_INCLUDE_DIRS}
${orocos_kdl_INCLUDE_DIRS})
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-kinematics-dynamics)

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

Expand Down
2 changes: 0 additions & 2 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ cmake_dependent_option(ENABLE_tests "Enable/disable unit tests" ON

if(ENABLE_tests)

find_package(YARP REQUIRED)

add_subdirectory(${GTestSources_SOURCE_DIR} ${CMAKE_BINARY_DIR}/gtest)

include_directories(${GTestSources_INCLUDE_DIR}
Expand Down

0 comments on commit 5aaa3e9

Please sign in to comment.