-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
47 lines (35 loc) · 2.45 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
cmake_minimum_required(VERSION 3.16) # Minimum cmake requirement
project(ergocub-gaze-control
LANGUAGES CXX
VERSION 0.0.100)
set(CMAKE_CXX_STANDARD 17)
include(GNUInstallDirs)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}")
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
# Default build type 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()
include(InstallBasicPackageFiles)
include(AddInstallRPATHSupport)
include(AddUninstallTarget)
################################## Necessary packages to compile ###################################
find_package(Eigen3 REQUIRED)
find_package(iDynTree REQUIRED) # Links below to iDynTree
find_package(YARP 3.3.0 REQUIRED) # Links below to ${YARP_LIBRARIES}
find_package(eCubGazeControllerInterface REQUIRED)
#################################### Other files to be built #######################################
# add_subdirectory(gazebo) # Location of other CMakeLists
include_directories(include) # Location of header files
#################################### Executables to be compiled ####################################
add_executable(ergocub-gaze-control src/server.cpp include/GazeControl.cpp include/JointInterface.cpp include/QPSolver.cpp)
target_link_libraries(ergocub-gaze-control eCubGazeControllerInterface::eCubGazeControllerInterface Eigen3::Eigen iDynTree::idyntree-high-level ${YARP_LIBRARIES})
#################################### Executables to be compiled ####################################
add_executable(test src/test.cpp include/GazeControl.cpp include/JointInterface.cpp include/QPSolver.cpp)
target_link_libraries(test eCubGazeControllerInterface::eCubGazeControllerInterface Eigen3::Eigen iDynTree::idyntree-high-level ${YARP_LIBRARIES})
install(TARGETS ergocub-gaze-control DESTINATION bin) #test