robotology / robotology-vcpkg-ports

Collection of vcpkg ports available on limited platforms just in binary form.
MIT License
6 stars 1 forks source link

Set only partial path to ipopt headers #3

Closed pattacini closed 5 years ago

pattacini commented 5 years ago

I've switched my local installation based on vcpkg to the use of ipopt binary port.

However, vcpkg yields only the relative path include\coin, instead of the complete path to the installed headers, e.g. c:\dev\vcpkg\installed\x64-windows\include\coin.

As a result, icub-main fails to compile, for example.

traversaro commented 5 years ago

I am not sure if it is a problem of the port or it is actually a problem of the FindIPOPT.cmake cmake file, but I reproduced indeed the issue in https://github.com/robotology/idyntree/pull/568/checks?check_run_id=205953915 .

traversaro commented 5 years ago

Indeed the problem is in https://github.com/robotology/ycm/blob/811edb419ab9731a8bfead99b6361cc4f0f3f595/find-modules/FindIPOPT.cmake#L133, that hardcodes the value of IPOPT_INCLUDE_DIRS to be ${IPOPT_DIR}/include/coin instead of properly finding the include directory location using the find_path CMake command.

While the issue is fixed in ycm and icub-main, a possible workaround is to set the IPOPT_DIR CMake Cache variable to <vcpkg_parent_directory>/vcpkg/installed/x64-windows, or for a clean build set the env variable IPOPT_DIR to <vcpkg_parent_directory>/vcpkg/installed/x64-windows