| 12345678910111213141516171819202122232425262728293031323334 |
- # Find system packages
- # Required packages
- find_package(PkgConfig REQUIRED)
- find_package(Threads REQUIRED)
- find_package(OpenSSL REQUIRED)
- find_package(CURL REQUIRED)
- # nlohmann-json
- find_package(nlohmann_json 3.11 QUIET)
- if(NOT nlohmann_json_FOUND)
- pkg_check_modules(nlohmann_json REQUIRED IMPORTED_TARGET nlohmann_json)
- add_library(nlohmann_json::nlohmann_json ALIAS PkgConfig::nlohmann_json)
- endif()
- # spdlog
- find_package(spdlog QUIET)
- if(NOT spdlog_FOUND)
- pkg_check_modules(spdlog REQUIRED IMPORTED_TARGET spdlog)
- add_library(spdlog::spdlog ALIAS PkgConfig::spdlog)
- endif()
- # gRPC and Protobuf
- find_package(gRPC CONFIG QUIET)
- if(NOT gRPC_FOUND)
- pkg_check_modules(grpc++ REQUIRED IMPORTED_TARGET grpc++)
- add_library(gRPC::grpc++ ALIAS PkgConfig::grpc++)
- endif()
- find_package(Protobuf REQUIRED)
- # libwebsockets
- pkg_check_modules(websockets REQUIRED IMPORTED_TARGET libwebsockets)
- add_library(websockets ALIAS PkgConfig::websockets)
|