Skip to content

Commit

Permalink
Consume YCM as a hard dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterBowman committed Jun 15, 2018
1 parent ccfeb48 commit 8dc8928
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 550 deletions.
12 changes: 10 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ before_install:
- if [ ! `git config --get user.name` ]; then `git config --global user.name 'Travis CI'`; fi

#-- Set YARP branch on cron jobs
- '[[ "$TRAVIS_EVENT_TYPE" = cron ]] && export YARP_CHECKOUT=devel || export YARP_CHECKOUT=master'
- '[[ "$TRAVIS_EVENT_TYPE" = cron ]] && export ROBOTOLOGY_CHECKOUT=devel || export ROBOTOLOGY_CHECKOUT=master'

#-- Register SSH deploy key for AMOR API private repository
#-- https://gist.github.com/lukewpatterson/4242707#gistcomment-2382443
Expand All @@ -33,8 +33,16 @@ install:
#-- Install Boost.Thread (AMOR API), Eigen3 (AMOR API and YARP) and GTest
- sudo apt-get install libboost-thread-dev libeigen3-dev libgtest-dev

#-- Install YCM
- git clone --branch="$ROBOTOLOGY_CHECKOUT" https://github.com/robotology/ycm
- cd ycm && mkdir build && cd build
- cmake ..
- make -j$(nproc)
- sudo make install
- cd ../..

#-- Install YARP
- git clone --branch="$YARP_CHECKOUT" https://github.com/robotology/yarp
- git clone --branch="$ROBOTOLOGY_CHECKOUT" https://github.com/robotology/yarp
- cd yarp && mkdir build && cd build
- cmake .. -DSKIP_ACE=ON -DCREATE_LIB_MATH=ON
- make -j$(nproc)
Expand Down
35 changes: 15 additions & 20 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,22 @@ endif()

# Pick up our cmake modules.
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake
${CMAKE_SOURCE_DIR}/cmake/find-modules
${CMAKE_SOURCE_DIR}/cmake/ycm-modules)
${CMAKE_SOURCE_DIR}/cmake/find-modules)

# Bootstrap YCM.
# https://github.com/robotology/ycm/issues/118
set(YCM_TAG v0.6.0)
include(YCMBootstrap)
# Find project's hard dependencies.
find_package(YCM 0.6 REQUIRED)
find_package(YARP REQUIRED)
find_package(COLOR_DEBUG 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 WITH_PLUGINS)

# Standard installation directories.
include(GNUInstallDirs)
Expand All @@ -66,20 +75,6 @@ endif()
# Store list of exported targets in global scope.
set_property(GLOBAL PROPERTY ROBOTICSLAB_KINEMATICS_DYNAMICS_TARGETS)

# Find project's hard dependencies.
find_package(COLOR_DEBUG REQUIRED)
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 WITH_PLUGINS)

# Create targets if specific requirements are satisfied.
include(CMakeDependentOption)

Expand Down
Loading

0 comments on commit 8dc8928

Please sign in to comment.