Commit d571224b authored by Max Lyon's avatar Max Lyon
Browse files

do not try do find osqp if it is already a target

parent 6c2f9d98
......@@ -479,9 +479,11 @@ target_link_libraries (CoMISo PUBLIC
${COMISO_LINK_LIBRARIES}
)
find_package(osqp)
if (TARGET osqp::osqp)
target_link_libraries (CoMISo PRIVATE osqp::osqp )
if (NOT TARGET osqp)
find_package(osqp)
endif()
if (TARGET osqp)
target_link_libraries (CoMISo PRIVATE osqp)
set (COMISO_OSQP_CONFIG_FILE_SETTINGS "#define COMISO_OSQP_AVAILABLE 1" )
else()
set (COMISO_OSQP_CONFIG_FILE_SETTINGS "#define COMISO_OSQP_AVAILABLE 0" )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment