如果absl库已安装,但CMake仍然找不到它,可能是因为CMake的查找路径没有包含absl库的配置文件。您可以通过设置CMAKE_PREFIX_PATH环境变量或在CMakeLists.txt中显式指定路径来解决这个问题。 在CMakeLists.txt中,您可以尝试使用find_package命令并指定路径: cmake find_package(absl REQUIRED PATHS /path/to/absl/c...
cmake_minimum_required(VERSION 3.15) project("Test" VERSION "0.1") find_package(protobuf REQUIRED) find_package(gRPC REQUIRED) find_package(absl REQUIRED) find_package(nlohmann_json 3.7.0 REQUIRED) find_package(prometheus-cpp CONFIG REQUIRED) find_package(opentelemetry-cpp 1.13.0 CONFIG REQUIRED) ...
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found suitable version "1.1.1f", minimum required is "1.0.2") -- Providing CMake module for FindOpenSSLAlt as part of Arrow CMake package -- Found OpenSSL Crypto Library: /usr/lib/x86_64-linux-gnu/libcrypto.so -- Building...