diff --git a/CHANGELOG.md b/CHANGELOG.md index 2010ce5..8edf07e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/ipopt-binary/Ipopt-config.cmake b/ipopt-binary/Ipopt-config.cmake index 91b4929..1e72aba 100644 --- a/ipopt-binary/Ipopt-config.cmake +++ b/ipopt-binary/Ipopt-config.cmake @@ -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()