Skip to content
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
url = git://github.com/roboptim/roboptim-shared-tests.git
[submodule "cmake"]
path = cmake
url = git://github.com/jrl-umi3218/jrl-cmakemodules.git
url = https://github.com/jrl-umi3218/jrl-cmakemodules

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @saikishor for the feedback. For some reason, the git link on my side is timing out where as the https link allows a fast submodule pull. For this reason the following command:

git clone --recurse-submodules http://github.com/roboptim/roboptim-core-plugin-ipopt.git

is not working due to a long timeout.
The travis submodule for me is also a problem. I had to individually init and update the cmake module.

  • If you confirm that you have the same problem then I could remove also travis which is deprecated.
  • If you do not have the problem, then I wonder what is the problem on my side.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll check and get back

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[submodule ".travis"]
path = .travis
url = git://github.com/jrl-umi3218/jrl-travis.git
22 changes: 13 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,21 @@
# along with roboptim-core. If not, see <http://www.gnu.org/licenses/>.

# Requires at least CMake 2.8 to configure the package.
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
CMAKE_MINIMUM_REQUIRED(VERSION 3.16)

INCLUDE(cmake/base.cmake)
INCLUDE(cmake/boost.cmake)
INCLUDE(cmake/cpack.cmake)
SET(CMAKE_CXX_STANDARD 11)

SET(PROJECT_NAME roboptim-core-plugin-ipopt)
SET(PROJECT_DESCRIPTION "RobOptim core IPOPT plug-in")
SET(PROJECT_URL "https://github.com/roboptim/roboptim-core-plugin-ipopt")
set(PROJECT_USE_CMAKE_EXPORT TRUE)

INCLUDE(cmake/base.cmake)
INCLUDE(cmake/boost.cmake)
INCLUDE(cmake/cpack.cmake)

compute_project_args(PROJECT_ARGS LANGUAGES CXX C)
project(${PROJECT_NAME} ${PROJECT_ARGS})

# Use MathJax for Doxygen formulae
SET(DOXYGEN_USE_MATHJAX "YES")
Expand All @@ -37,7 +43,6 @@ SET(HEADERS

SET(PKG_CONFIG_ADDITIONAL_VARIABLES plugindir relplugindir ${PKG_CONFIG_ADDITIONAL_VARIABLES})

SETUP_PROJECT()

# If compiler support symbol visibility, enable it.
INCLUDE(CheckCCompilerFlag)
Expand Down Expand Up @@ -68,8 +73,9 @@ IF (NOT LTDL_H_FOUND)
ENDIF()

# Search for roboptim-core.
ADD_REQUIRED_DEPENDENCY("roboptim-core >= 3.2")

ADD_REQUIRED_DEPENDENCY(roboptim-core)
ADD_PROJECT_DEPENDENCY(roboptim-core)
add_project_dependency(Eigen3)
# Workaround Ipopt package issue.
# It does not define HAVE_STDDEF even when it is needed, so we will do
# it manually.
Expand Down Expand Up @@ -144,5 +150,3 @@ ELSE()
"Tests should only be disabled for speficic cases. Do it at your own risk.")
ENDIF()

SETUP_PROJECT_FINALIZE()
SETUP_PROJECT_CPACK()
2 changes: 1 addition & 1 deletion cmake
Submodule cmake updated 155 files
20 changes: 20 additions & 0 deletions package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0"?>
<package format="3">
<name>roboptim-core-plugin-ipopt</name>
<version>0.1.0</version>
<description>This plus provides the interface from roboptim to ipopt.</description>

<maintainer email="[email protected]">Guilhem Saurel</maintainer>

<license>BSD</license>

<buildtool_depend>ament_cmake</buildtool_depend>

<build_depend>rclcpp</build_depend>
<build_depend>roboptim-core</build_depend>
<depend>coinor-libipopt-dev</depend>

<exec_depend>rclcpp</exec_depend>
<exec_depend>roboptim-core</exec_depend>

</package>
6 changes: 4 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@ MACRO(IPOPT_PLUGIN NAME)
PROPERTIES VERSION 3.2.0 SOVERSION 3)
ENDIF()
INSTALL(TARGETS roboptim-core-plugin-${NAME}
EXPORT ${TARGETS_EXPORT_NAME}
DESTINATION ${PLUGINDIR})
PKG_CONFIG_USE_DEPENDENCY(roboptim-core-plugin-${NAME} ipopt)
PKG_CONFIG_USE_COMPILE_DEPENDENCY(roboptim-core-plugin-${NAME} roboptim-core)

#PKG_CONFIG_USE_COMPILE_DEPENDENCY(roboptim-core-plugin-${NAME} roboptim-core)
TARGET_LINK_LIBRARIES(roboptim-core-plugin-${NAME} roboptim-core::roboptim-core Eigen3::Eigen)

# Make sure all symbols are defined.
# See: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=592752
IF(CMAKE_SYSTEM_NAME MATCHES "Linux"
Expand Down