RealTimeChris / DiscordCoreAPI

A bot library for Discord, written in C++, and featuring explicit multithreading through the usage of custom, asynchronous C++ CoRoutines.
https://discordcoreapi.com
MIT License
153 stars 17 forks source link

Cmake no longer needs Find deps config files #24

Closed Samega7Cattac closed 2 years ago

Samega7Cattac commented 2 years ago

Tested on Windows (with Vcpkg) and Linux (without Vcpkg). There was also added a missing include to compile on linux. WARNING: Now the cmake command only needs to know the Vcpkg installation dir in the var VCPKG_ROOT.

RealTimeChris commented 2 years ago
PS C:\Users\Chris\Downloads\DiscordCoreAPI-cmake-find-deps> cmake -S . --preset=Windows-Release -DVCPKG_ROOT="C:/vcpkg"
Preset CMake variables:

  CMAKE_BUILD_TYPE="Release"

-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.22000.
CMake Error at Library/CMakeLists.txt:53 (find_package):
  By not providing "Findnlohmann_json.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "nlohmann_json", but CMake did not find one.

  Could not find a package configuration file provided by "nlohmann_json"
  with any of the following names:

    nlohmann_jsonConfig.cmake
    nlohmann_json-config.cmake

  Add the installation prefix of "nlohmann_json" to CMAKE_PREFIX_PATH or set
  "nlohmann_json_DIR" to a directory containing one of the above files.  If
  "nlohmann_json" provides a separate development package or SDK, be sure it
  has been installed.

-- Configuring incomplete, errors occurred!
See also "C:/Users/Chris/Downloads/DiscordCoreAPI-cmake-find-deps/Build/Release/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Chris/Downloads/DiscordCoreAPI-cmake-find-deps/Build/Release/CMakeFiles/CMakeError.log".
PS C:\Users\Chris\Downloads\DiscordCoreAPI-cmake-find-deps>