robotology / osqp-eigen

Simple Eigen-C++ wrapper for OSQP library
https://robotology.github.io/osqp-eigen/
BSD 3-Clause "New" or "Revised" License
395 stars 118 forks source link

Target links to target "OSQPEigen::OSQPEigen" but the target was not found. #40

Closed psarahdactyl closed 4 years ago

psarahdactyl commented 4 years ago

I followed the installation instructions in the README and have pointed cmake to the install directory:

export OsqpEigen_DIR=/usr/local/lib/cmake/OsqpEigen/

In my cmake I have:

find_package(OSQPEigen REQUIRED)
...
target_link_libraries(${PROJECT_NAME}_bin osqp::osqp)
target_link_libraries(${PROJECT_NAME}_bin OSQPEigen::OSQPEigen)

but it tells me the target "OSQPEigen::OSQPEigen" was not found.

I am using MacOS 10.15.1

psarahdactyl commented 4 years ago

Edit: so it turns out I needed to use the case sensitive "OsqpEigen" I feel stupid, but this mistake did come from the fork where I used "OSQPWrapper" instead. It took me a little bit to realize I needed to change the target names from OSQPWrapper to OSQPEigen, and then it obviously didn't work because of the case.