c++ CMake of google-cloud-cpp for speech fails

6pp0gazn  于 2023-05-30  发布在  Go
关注(0)|答案(1)|浏览(136)

我正在尝试从语音运行快速启动文件:https://github.com/googleapis/google-cloud-cpp/tree/main/google/cloud/speech
我已经安装了所有的依赖项,但cmake命令对我来说失败了,并出现以下错误:

-- Found RE2 via CMake.
CMake Error at /root/vcpkg/scripts/buildsystems/vcpkg.cmake:613 (_add_library):
  _add_library cannot create ALIAS target
  "google-cloud-cpp::experimental-speech" because target
  "google-cloud-cpp::speech" is IMPORTED.
Call Stack (most recent call first):
  /root/vcpkg/installed/x64-linux/share/google_cloud_cpp_speech/google_cloud_cpp_speech-config.cmake:25 (add_library)
  /root/vcpkg/scripts/buildsystems/vcpkg.cmake:824 (_find_package)
  CMakeLists.txt:21 (find_package)

我使用的命令:

cmake -H. -B.build -DCMAKE_TOOLCHAIN_FILE=$HOME/vcpkg/scripts/buildsystems/vcpkg.cmake

在超级文件夹中运行相同的命令时,我没有收到错误。下面是在超级文件夹级别使用的命令的输出:

root@jioeva-cas-dev-2:~/google-cloud-cpp# cmake -H. -B.build -DCMAKE_TOOLCHAIN_FILE=$HOME/vcpkg/scripts/buildsystems/vcpkg.cmake
-- Doxygen generation only enabled for cmake 3.9 and higher
-- CURL linkage will be non-static
-- Doxygen generation only enabled for cmake 3.9 and higher
-- Doxygen generation only enabled for cmake 3.9 and higher
-- Doxygen generation only enabled for cmake 3.9 and higher
-- Doxygen generation only enabled for cmake 3.9 and higher
-- Doxygen generation only enabled for cmake 3.9 and higher
-- Doxygen generation only enabled for cmake 3.9 and higher
-- Doxygen generation only enabled for cmake 3.9 and higher
-- CURL linkage will be non-static
-- CURL linkage will be non-static
-- Configuring done
-- Generating done
-- Build files have been written to: /root/google-cloud-cpp/.build

相关问题