hunter_add_package(cpr) find_package(cpr CONFIG REQUIRED) add_executable(cpr_example ...) target_link_libraries(cpr_example cpr::cpr)