Skip to content

Commit

Permalink
Merge pull request #793 from robotology/fix-ipopt
Browse files Browse the repository at this point in the history
FindIPOPT: Port YCM changes
  • Loading branch information
traversaro authored Dec 7, 2020
2 parents 7ad5da6 + 49e268d commit 227ca49
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions cmake/FindIPOPT.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,12 @@ else()
set(IPOPT_DIR $ENV{IPOPT_DIR} CACHE PATH "Path to IPOPT build directory")

find_path(IPOPT_INCLUDE_DIRS NAMES IpIpoptApplication.hpp PATH_SUFFIXES coin coin-or PATHS ${IPOPT_DIR}/include/coin)

find_library(IPOPT_IPOPT_LIBRARY_RELEASE libipopt ${IPOPT_DIR}/lib
${IPOPT_DIR}/lib/coin)
find_library(IPOPT_IPOPT_LIBRARY_DEBUG libipoptD ${IPOPT_DIR}/lib
${IPOPT_DIR}/lib/coin)

# See https://github.com/coin-or/Ipopt/blob/releases/3.13.3/src/Interfaces/Ipopt.java#L167 for a possible library names
find_library(IPOPT_IPOPT_LIBRARY_RELEASE NAMES libipopt ipopt ipopt-3 ipopt-0 libipopt-3 libipopt-0
HINTS ${IPOPT_DIR}/lib ${IPOPT_DIR}/lib/coin)
find_library(IPOPT_IPOPT_LIBRARY_DEBUG NAMES libipoptD ipoptD ipoptD-3 ipoptD-0 libipoptD-3 libipoptD-0
HINTS ${IPOPT_DIR}/lib ${IPOPT_DIR}/lib/coin)

select_library_configurations(IPOPT_IPOPT)
set(IPOPT_LIBRARIES ${IPOPT_IPOPT_LIBRARY})
Expand Down

0 comments on commit 227ca49

Please sign in to comment.