0

I am using vs code and CMake to generator the yuzu project, but the CMakeList.txt always report error on the conan code since line 127 ,and I have already install the conan in the CMD with pip command.

Yuzu project and the CMakeList.txt

CMake output

[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".

generally its a problem that the CMakeList.txt file can't run the code about the conan and the lib can't be auto download, but how can i sovle the porblem, bro??????The project do not offer the conan.cmake. im a web developer,not familiar with the c++ proj construct.

Community
  • 1
  • 1
amjackfan
  • 1
  • 2
  • 2
    Welcome to Stack Overflow! Please provide the **complete** CMake output in your question post, along with the commands you use to run CMake. – Kevin May 26 '20 at 14:41
  • Also, did you [install](https://docs.conan.io/en/latest/getting_started.html#installing-dependencies) the required conan packages? – Botje May 26 '20 at 14:53
  • Please, provide more details, like your cmake file. The error described seems like conan.cmake is not loaded. conan_check is a function from conan.cmake – uilianries May 26 '20 at 15:02
  • I can't reproduce your error, actually it works good. You need to specify your steps, only that output doesn't help. My steps: git clone https://github.com/yuzu-emu/yuzu.git; cd yuzu; git submodule update --init --recursive; mkdir build; cd build; cmake ..; All good. – uilianries May 26 '20 at 17:15

1 Answers1

1

The CMakeLists.txt of the yuzu repository (found at the parent directory) requires version 1.24.0 of conan, while the latest is 1.25.2. I assume you have installed the latest version.

Change line 252 from:

conan_check(VERSION 1.24.0 REQUIRED)

to:

conan_check(VERSION 1.25.2 REQUIRED)

and it should work.

Do not forget to delete the cmake cache in your build folder.