Open
Description
Hi,
I've just tried to link lsqcpp. According to the readme it requires installation (installed to /usr) and
find_package(lsqcpp REQUIRED)
add_executable(myproject main.cpp)
target_link_libraries(myproject lsqcpp::lsqcpp)
But this leads to error:
-- Configuring done
CMake Error at myproject/CMakeLists.txt:22 (target_link_libraries):
Target "myproject" links to:
lsqcpp::lsqcpp
but the target was not found. Possible reasons include:
* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.
In lsqcpp/lsqcpp-config.cmake I can see following:
add_library(lsqcpp INTERFACE)
target_include_directories(lsqcpp INTERFACE "${lsqcpp_INCLUDE_DIR}")
target_link_libraries(lsqcpp INTERFACE Eigen3::Eigen)
add_library(lsqcpp::lsqcpp ALIAS lsqcpp)
So instead of target_link_libraries(myproject lsqcpp::lsqcpp)
I tried just target_link_libraries(myproject lsqcpp)
- it works.
I'm not a cmake expert, could you doublecheck if readme instructions are still actual?
Metadata
Metadata
Assignees
Labels
No labels