Skip to content

Commit

Permalink
Add YCM ad dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicogene committed Dec 13, 2023
1 parent 768ea0a commit 0358a28
Showing 1 changed file with 31 additions and 2 deletions.
33 changes: 31 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

cmake_minimum_required(VERSION 3.12)

project(ergocub-software
VERSION 0.6.0)
project(ergocub-software LANGUAGES C CXX
VERSION 0.6.0)

find_package(YARP 3.7.2 REQUIRED)

Expand All @@ -16,13 +16,42 @@ if(POLICY CMP0046)
cmake_policy(SET CMP0046 NEW)
endif()

find_package(YCM 0.12 REQUIRED)

list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

include(AddUninstallTarget)

option(BUILD_TESTING "Run tests for the generated models" OFF)
option(COMPILE_ergoCubEmotions "Compile the module controlling the ergoCub emotions" OFF)

if(MSVC)
set(CMAKE_DEBUG_POSTFIX "d")
endif()

# To build shared libraries in Windows, we set CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS to TRUE.
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)

option(BUILD_SHARED_LIBS "Build libraries as shared as opposed to static" ON)
# Build position independent code.
set(CMAKE_POSITION_INDEPENDENT_CODE ON)

# Enable RPATH support for installed binaries and libraries
include(AddInstallRPATHSupport)
add_install_rpath_support(LIB_DIRS "${CMAKE_INSTALL_FULL_LIBDIR}" # Libraries
BIN_DIRS "${CMAKE_INSTALL_FULL_BINDIR}" # Binaries
"${CMAKE_INSTALL_FULL_LIBDIR}/yarp" # Plugins
INSTALL_NAME_DIR "${CMAKE_INSTALL_FULL_LIBDIR}"
USE_LINK_PATH)

# Encourage user to specify a build type (e.g. Release, Debug, etc.), otherwise set it to Release.
if(NOT CMAKE_CONFIGURATION_TYPES)
if(NOT CMAKE_BUILD_TYPE)
message(STATUS "Setting build type to 'Release' as none was specified.")
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY VALUE "Release")
endif()
endif()

set(BUILD_PREFIX "ergoCub")
add_subdirectory(urdf)

Expand Down

0 comments on commit 0358a28

Please sign in to comment.