hunter_add_package(xgboost) find_package(xgboost CONFIG REQUIRED) target_link_libraries(... xgboost::xgboost)