CMake Error: TARGETS given no LIBRARY DESTINATION for shared library target
cmake, lemon-graph-library
Solution
In my `CMakeLists.txt`, my INSTALL command had no LIBRARY parameter.
Changing from this:
INSTALL(
TARGETS lemon
ARCHIVE DESTINATION lib
COMPONENT library
)
to this:
INSTALL(
TARGETS lemon
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib # <-- Add this line
COMPONENT library
)
fixed my problem.
Problem
When building an opensource project with CMake (in my case, it was the lemon graph library), I got this error when I tried to build shared libaries via `-DBUILD_SHARED_LIBS=1`: ``` TARGETS given no LIBRARY DESTINATION for shared library target ``` Where does this error come from and how do I fix it?