Skip to content

Commit 5587fc8

Browse files
authored
Merge pull request #8 from olivier-stasse/master
cmake changes to detect qpoases
2 parents d12e7fe + 6b06f3b commit 5587fc8

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,30 @@ INCLUDE(cmake/base.cmake)
44
INCLUDE(cmake/eigen.cmake)
55
INCLUDE(private_cmake/FindqpOASES.cmake)
66

7+
# Stop if qpOASES is not here
78
IF (NOT qpOASES_FOUND)
89
MESSAGE(ERROR " qpOASES not found. Please install it (using robotpkg for instance)")
910
ENDIF()
1011

12+
# Compiles despite warnings
1113
SET(CXX_DISABLE_WERROR True)
14+
# Display all warnings
1215
SET(CMAKE_VERBOSE_MAKEFILE True)
1316

17+
# Set project identity
1418
SET(PROJECT_NAME ddp-actuator-solver)
1519
SET(PROJECT_DESCRIPTION "DDP/iLQR solver for robotics actuators command")
1620
SET(PROJECT_URL "https://github.com/stack-of-tasks/ddp-actuator-solver")
1721

1822
SETUP_PROJECT()
1923

24+
# Add eigen3 as another needed dependency
2025
ADD_REQUIRED_DEPENDENCY("eigen3 >= 3.0.5")
2126

2227
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
2328
INCLUDE_DIRECTORIES(${qpOASES_INCLUDEDIR})
2429

30+
# Set the headers to be installed
2531
SET(${PROJECT_NAME}_HEADERS
2632
include/ddp-actuator-solver/costfunction.hh
2733
include/ddp-actuator-solver/dynamicmodel.hh
@@ -35,4 +41,8 @@ ADD_SUBDIRECTORY(src)
3541
ADD_SUBDIRECTORY(test)
3642
ADD_SUBDIRECTORY(examples)
3743

44+
# Generate dependency to ddp-actuator-solver-examples in pc file
45+
PKG_CONFIG_APPEND_LIBS(ddp-actuator-solver-examples)
46+
PKG_CONFIG_APPEND_LIBS(${qpOASES_LIBRARIES})
47+
3848
SETUP_PROJECT_FINALIZE()

examples/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ SET(header_files
3030
)
3131

3232
ADD_LIBRARY(${PROJECT_NAME}-examples SHARED ${source_files})
33+
TARGET_LINK_LIBRARIES(${PROJECT_NAME}-examples ${qpOASES_LIBRARIES})
3334

3435
PKG_CONFIG_USE_DEPENDENCY(${PROJECT_NAME}-examples eigen3)
3536

0 commit comments

Comments
 (0)