Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Humanoid Path Planner
hpp-centroidal-dynamics
Commits
a7e4cab5
Commit
a7e4cab5
authored
Jan 04, 2019
by
Guilhem Saurel
Browse files
[CMake] fix qpOASES detection
parent
16b2f000
Changes
4
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
a7e4cab5
...
...
@@ -3,7 +3,6 @@ cmake_minimum_required(VERSION 2.6)
INCLUDE
(
cmake/base.cmake
)
INCLUDE
(
cmake/test.cmake
)
INCLUDE
(
cmake/python.cmake
)
INCLUDE
(
cmake2/FindqpOASES.cmake
)
SET
(
PROJECT_ORG stonneau
)
SET
(
PROJECT_NAME hpp-centroidal-dynamics
)
...
...
@@ -51,7 +50,12 @@ else()
endif
()
#SEARCH_FOR_QPOASES()
ADD_REQUIRED_DEPENDENCY
(
"qpOASES"
)
#ADD_REQUIRED_DEPENDENCY("qpOASES")
SET
(
QPOASES_PREFIX
${
CMAKE_PREFIX_PATH
}
CACHE PATH
"Set the prefix where qpOASES is installed"
)
FIND_LIBRARY
(
QPOASES_LIBRARY
"qpOASES"
PATHS
${
QPOASES_PREFIX
}
PATH_SUFFIXES lib
)
FIND_PATH
(
QPOASES_INCLUDE_DIRS NAMES
"qpOASES.hpp"
PATHS
${
QPOASES_PREFIX
}
PATH_SUFFIXES include
)
INCLUDE_DIRECTORIES
(
${
QPOASES_INCLUDE_DIRS
}
)
ADD_SUBDIRECTORY
(
include/
${
CUSTOM_HEADER_DIR
}
)
add_subdirectory
(
src
)
...
...
cmake2/FindqpOASES.cmake
deleted
100644 → 0
View file @
16b2f000
#.rst:
# FindqpOASES
# -----------
#
# Try to find the qpOASES library.
# Once done this will define the following variables::
#
# qpOASES_FOUND - System has qpOASES
# qpOASES_INCLUDE_DIR - qpOASES include directory
# qpOASES_LIBRARY - qpOASES libraries
#
# qpOASES does not have an "install" step, and the includes are in the source
# tree, while the libraries are in the build tree.
# Therefore the environment and cmake variables `qpOASES_SOURCE_DIR` and
# `qpOASES_BINARY_DIR` will be used to locate the includes and libraries.
#=============================================================================
# Copyright 2014 iCub Facility, Istituto Italiano di Tecnologia
# Authors: Daniele E. Domenichelli <daniele.domenichelli@iit.it>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of YCM, substitute the full
# License text for the above reference.)
MACRO
(
SEARCH_FOR_QPOASES
)
include
(
FindPackageHandleStandardArgs
)
find_path
(
qpOASES_INCLUDEDIR
NAMES qpOASES.hpp
HINTS
"
${
qpOASES_SOURCE_DIR
}
"
ENV qpOASES_SOURCE_DIR
PATH_SUFFIXES include
)
find_library
(
qpOASES_LIB
NAMES qpOASES
HINTS
"
${
qpOASES_BINARY_DIR
}
"
ENV qpOASES_BINARY_DIR
PATH_SUFFIXES lib
libs
)
set
(
qpOASES_INCLUDE_DIR
${
qpOASES_INCLUDEDIR
}
)
set
(
qpOASES_LIBRARY
${
qpOASES_LIB
}
)
find_package_handle_standard_args
(
qpOASES DEFAULT_MSG qpOASES_LIBRARY
qpOASES_INCLUDE_DIR
)
set
(
qpOASES_FOUND
${
QPOASES_FOUND
}
)
ENDMACRO
(
SEARCH_FOR_QPOASES
)
src/CMakeLists.txt
View file @
a7e4cab5
...
...
@@ -19,9 +19,8 @@ SET(${LIBRARY_NAME}_SOURCES
ADD_LIBRARY
(
${
LIBRARY_NAME
}
SHARED
${${
LIBRARY_NAME
}
_SOURCES
}
)
TARGET_LINK_LIBRARIES
(
${
LIBRARY_NAME
}
${
CDD_LIBRARIES
}
)
TARGET_LINK_LIBRARIES
(
${
LIBRARY_NAME
}
${
CDD_LIBRARIES
}
${
QPOASES_LIBRARY
}
)
PKG_CONFIG_USE_DEPENDENCY
(
${
LIBRARY_NAME
}
eigen3
)
PKG_CONFIG_USE_DEPENDENCY
(
${
LIBRARY_NAME
}
qpOASES
)
if
(
CLP_FOUND
)
TARGET_LINK_LIBRARIES
(
${
LIBRARY_NAME
}
${
CLP_LIBRARIES
}
...
...
test/CMakeLists.txt
View file @
a7e4cab5
...
...
@@ -9,6 +9,5 @@ PKG_CONFIG_USE_DEPENDENCY(static-equilibrium eigen3)
TARGET_LINK_LIBRARIES
(
static-equilibrium
${
PROJECT_NAME
}
)
ADD_UNIT_TEST
(
lp-solvers test_LP_solvers
)
PKG_CONFIG_USE_DEPENDENCY
(
lp-solvers qpOASES
)
PKG_CONFIG_USE_DEPENDENCY
(
lp-solvers eigen3
)
TARGET_LINK_LIBRARIES
(
lp-solvers
${
PROJECT_NAME
}
)
TARGET_LINK_LIBRARIES
(
lp-solvers
${
PROJECT_NAME
}
${
QPOASES_LIBRARY
}
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment