Skip to content

Commit

Permalink
ipopt-binary: Add ipopt imported target in Ipopt-config.cmake (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
traversaro authored Apr 10, 2023
1 parent 3185e33 commit 3c219d6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.2.1] - 2023-04-10

### Added
- Added `ipopt` CMake imported target in the CMake config file installed by the `ipopt-binary` (https://github.com/robotology/robotology-vcpkg-ports/pull/22).

## [0.2.0] - 2021-05-29

### Added
Expand Down
8 changes: 8 additions & 0 deletions ipopt-binary/Ipopt-config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,11 @@ set(Ipopt_LIBRARIES "optimized;${PACKAGE_PREFIX_DIR}/lib/libipopt.lib;debug;${P
set(IPOPT_FOUND ON)
set(IPOPT_INCLUDE_DIRS ${Ipopt_INCLUDE_DIR})
set(IPOPT_LIBRARY_DIRS "${PACKAGE_PREFIX_DIR}/lib")

# The ipopt imported target is required by casadi's FindIPOPT
# See https://github.com/casadi/casadi/blob/3.6.0/cmake/FindIPOPT.cmake#L47
if(NOT TARGET ipopt)
add_library(ipopt INTERFACE)
target_link_libraries(ipopt INTERFACE ${Ipopt_LIBRARIES})
target_include_directories(ipopt INTERFACE ${IPOPT_INCLUDE_DIRS})
endif()

0 comments on commit 3c219d6

Please sign in to comment.