Ошибки CMake - Использование Conan в генераторе yuzu - PullRequest
0 голосов
/ 26 мая 2020

Я использую vs code и CMake для генерации проекта yuzu, но CMakeList.txt всегда сообщает об ошибке в коде conan, начиная со строки 127, и я уже установил conan в CMD с помощью команды pip.

Проект Yuzu и CMakeList.txt

Вывод CMake

[proc] run command: "C:\Program Files\CMake\bin\cmake.EXE" --no-warn-unused-cli "-Dcmake.cmakePath:STRING=C:/Program Files/CMake/bin/cmake" -Dcmake.configureOnOpen:BOOL=TRUE "-Dcmake.generator:STRING=MinGW Makefiles" -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -He:/Visual_Studio_Code/yuzu_emulator/yuzu -Be:/Visual_Studio_Code/yuzu_emulator/yuzu/build -G "Visual Studio 16 2019" -T host=x86 -A win32
[cmake] Not searching for unused variables given on the command line.
[cmake] -- Target architecture: x86
[cmake] -- Could NOT find Boost (missing: Boost_INCLUDE_DIR) (Required is at least version "1.71")
[cmake] -- Could NOT find Catch2 (missing: Catch2_INCLUDE_DIR Catch2_VERSION) (Required is at least version "2.11")
[cmake] -- Could NOT find fmt (missing: fmt_LIBRARY fmt_INCLUDE_DIR fmt_VERSION) (Required is at least version "6.2")
[cmake] -- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR) (Required is at least version "1.1")
[cmake] -- Could NOT find lz4 (missing: lz4_LIBRARY lz4_INCLUDE_DIR) (Required is at least version "1.8")
[cmake] -- Could NOT find nlohmann_json (missing: nlohmann_json_INCLUDE_DIR nlohmann_json_VERSION) (Required is at least version "3.7")
[cmake] -- Could NOT find opus (missing: opus_LIBRARY opus_INCLUDE_DIR) (Required is at least version "1.3")
[cmake] -- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR) (Required is at least version "1.2")
[cmake] -- Could NOT find zstd (missing: zstd_LIBRARY zstd_INCLUDE_DIR zstd_VERSION) (Required is at least version "1.4")
[cmake] CMake Warning at CMakeLists.txt:217 (find_package):
[cmake]   By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has
[cmake]   asked CMake to find a package configuration file provided by "Qt5", but
[cmake]   CMake did not find one.
[cmake] 
[cmake]   Could not find a package configuration file provided by "Qt5" (requested
[cmake]   version 5.9) with any of the following names:
[cmake] 
[cmake]     Qt5Config.cmake
[cmake]     qt5-config.cmake
[cmake] 
[cmake]   Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
[cmake]   to a directory containing one of the above files.  If "Qt5" provides a
[cmake]   separate development package or SDK, be sure it has been installed.
[cmake] 
[cmake] 
[cmake] CMake Warning at CMakeLists.txt:229 (find_package):
[cmake]   By not providing "FindSDL2.cmake" in CMAKE_MODULE_PATH this project has
[cmake]   asked CMake to find a package configuration file provided by "SDL2", but
[cmake]   CMake did not find one.
[cmake] 
[cmake]   Could not find a package configuration file provided by "SDL2" with any of
[cmake]   the following names:
[cmake] 
[cmake]     SDL2Config.cmake
[cmake]     sdl2-config.cmake
[cmake] 
[cmake]   Add the installation prefix of "SDL2" to CMAKE_PREFIX_PATH or set
[cmake]   "SDL2_DIR" to a directory containing one of the above files.  If "SDL2"
[cmake]   provides a separate development package or SDK, be sure it has been
[cmake]   installed.
[cmake] 
[cmake] 
[cmake] -- Packages boost/1.72.0;catch2/2.11.0;fmt/6.2.0;openssl/1.1.1f;lz4/1.9.2;nlohmann_json/3.7.3;opus/1.3.1;zlib/1.2.11;zstd/1.4.4;qt/5.14.1@bincrafters/stable;sdl2/2.0.12@bincrafters/stable not found!
[cmake] -- Configuring incomplete, errors occurred!
[cmake] See also "E:/Visual_Studio_Code/yuzu_emulator/yuzu/build/CMakeFiles/CMakeOutput.log".
[cmake] See also "E:/Visual_Studio_Code/yuzu_emulator/yuzu/build/CMakeFiles/CMakeError.log".
[cmake] CMake Error at CMakeLists.txt:252 (conan_check):
[cmake]   Unknown CMake command "conan_check".

обычно проблема в том, что файл CMakeList.txt может ' Запустите код о conan, и библиотека не может быть загружена автоматически, но как я могу решить эту проблему, братан ?????? Проект не предлагает conan.cmake. Я веб-разработчик, не знакомый с конструкцией проекта C ++.

1 Ответ

0 голосов
/ 01 июня 2020

Для CMakeLists.txt репозитория yuzu (находится в родительском каталоге) требуется версия Conan 1.24.0, а самая последняя - 1.25.2. Я предполагаю, что вы установили последнюю версию.

Измените строку 252 с:

conan_check(VERSION 1.24.0 REQUIRED)

на:

conan_check(VERSION 1.25.2 REQUIRED)

, и все должно работать.

Не забудьте удалить кеш cmake в папке сборки.

...