The package poco is compatible with built-in CMake targets: find_package(Poco REQUIRED [COMPONENTS ...]) target_link_libraries(main PRIVATE Poco::)