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 16, 2018
1 parent 38e3459 commit 2413387
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 552 deletions.
11 changes: 9 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ compiler:

before_install:
- sudo apt-get -qq update # -qq No output except for errors
- '[[ "$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,15 @@ install:
- cmake ..
- sudo make install
- cd ../..
#-- 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
- make -j$(nproc)
Expand Down
31 changes: 14 additions & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,21 @@ 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. Keep it compatible with cmake_minimum_required().
set(YCM_TAG v0.6.0)
include(YCMBootstrap)
# Find project's hard dependencies.
find_package(YCM 0.6 REQUIRED)

# https://github.com/roboticslab-uc3m/questions-and-answers/issues/65
find_package(YARP 3.0 QUIET COMPONENTS OS dev sig)
if(NOT YARP_FOUND)
find_package(YARP 2.3.70 REQUIRED)
endif()

find_package(COLOR_DEBUG REQUIRED)

# Configure installation paths for YARP resources.
yarp_configure_external_installation(roboticslab-yarp-devices WITH_PLUGINS)

# Standard installation directories.
include(GNUInstallDirs)
Expand All @@ -68,18 +77,6 @@ set_property(GLOBAL PROPERTY ROBOTICSLAB_YARP_DEVICES_TARGETS)
# Create targets if specific requirements are satisfied.
include(CMakeDependentOption)

# Find project's hard dependencies.
find_package(COLOR_DEBUG REQUIRED)

# https://github.com/roboticslab-uc3m/questions-and-answers/issues/65
find_package(YARP 3.0 QUIET COMPONENTS OS dev sig)
if(NOT YARP_FOUND)
find_package(YARP 2.3.70 REQUIRED)
endif()

# Configure installation paths for YARP resources.
yarp_configure_external_installation(roboticslab-yarp-devices WITH_PLUGINS)

# Add main contents.
add_subdirectory(cmake)
add_subdirectory(libraries)
Expand Down
Loading

0 comments on commit 2413387

Please sign in to comment.