Open simaocat opened 3 days ago
Use proper CMake integration:
You are not meant to run execute_process
in your CMake project.
Either use manifest mode (vcpkg runs automatically during project
), or use classic mode (i.e. you run vcpkg in advance).
Learn about using triplets:
The issue says arm64-osx
and AppleClang 15.0.0.15000309
.
But the execute_process
output shows x64-linux
. spdlog:x64-linux provides nothing for arm64-osx.
Yeah, use the manifest mode, that would avoid those lines in your cmake. Cleaner and more robust (i'm using spdlog on the same configuration and have no build issue)
Operating system
arm64-osx
Compiler
AppleClang 15.0.0.15000309
Steps to reproduce the behavior
Failure logs
CMake Warning at vcpkg/scripts/buildsystems/vcpkg.cmake:338 (message): Unable to determine target architecture, continuing without vcpkg. Call Stack (most recent call first): CMakeLists.txt:5 (include)
-- The C compiler identification is GNU 11.3.0 -- The CXX compiler identification is GNU 11.3.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done Computing installation plan... The following packages are already installed: gflags:x64-linux@2.2.2#9 gflags:x64-linux is already installed Total install time: 10.7 us gflags provides CMake targets:
Computing installation plan... The following packages are already installed: spdlog:x64-linux@1.15.0 spdlog:x64-linux is already installed Total install time: 9.8 us The package spdlog provides CMake targets:
CMake Error at CMakeLists.txt:36 (find_package): Could not find a package configuration file provided by "spdlog" with any of the following names:
Add the installation prefix of "spdlog" to CMAKE_PREFIX_PATH or set "spdlog_DIR" to a directory containing one of the above files. If "spdlog" provides a separate development package or SDK, be sure it has been installed.
Additional context
I wonder why gflags is found correctly while spdlog is missing. I comment out the line: find_package(spdlog CONFIG REQUIRED), and then the new error is : could not find package unofficial-brpcConfig.cmake. I comment out the line: find_package(unofficial-brpc CONFIG REQUIRED), and then the new error is: could not find package unofficial-braftConfig.cmake I also test on Ubuntu platform, the same error again.