check provides CMake targets: find_package(check CONFIG REQUIRED) target_link_libraries(main PRIVATE $,Check::check,Check::checkShared>)