1 2 3 4
The package knet provides CMake integration: find_package(knet CONFIG REQUIRED) target_link_libraries(main PRIVATE knet)