You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using FetchContent, Drogon isn't building due to an issue finding Jsoncpp. This is a bug as Jsoncpp should be imported similar to Trantor, as a submodule. It seems to be required to add Jsoncpp yourself like described below.
By itself in CMakeLists.txt, Jsoncpp builds and runs fine:
However Drogon does not seem to find it, specifically in FindJsoncpp.cmake with error:
CMake Error at .../cmake-3.30.4/Modules/FindPackageHandleStandardArgs.cmake:233 (message):
Could NOT find Jsoncpp (missing: JSONCPP_INCLUDE_DIRS JSONCPP_LIBRARIES)
Call Stack (most recent call first):
.../cmake-3.30.4/Modules/FindPackageHandleStandardArgs.cmake:603 (_FPHSA_FAILURE_MESSAGE)
build/_deps/drogon-src/cmake_modules/FindJsoncpp.cmake:36 (find_package_handle_standard_args)
build/_deps/drogon-src/CMakeLists.txt:189 (find_package)
The include directory can be manually fixed with set(CMAKE_INCLUDE_PATH "${CMAKE_CURRENT_BINARY_DIR}/_deps/jsoncpp-src/include") however I cannot find a way to fix find_library(JSONCPP_LIBRARIES ...). The find_library method is looking for a *.a or *.so file I believe which does not exist in any of the built Jsoncpp directories. Is there a way to download Jsoncpp using FetchContent? It seems the only solution I have found, which I haven't tested yet, is to manually download Jsoncpp.
Desktop (please complete the following information):
@NullUserException At the time of posting the original message I haven't which is what I meant by It seems the only solution I have found, which I haven't tested yet, is to manually download Jsoncpp. I tried afterward and it also wouldn't get picked up by FindJsoncpp.cmake.
I spun up an instance running Ubuntu 22.04 and I was running into the same problem (Could NOT find Jsoncpp (missing: JSONCPP_INCLUDE_DIRS JSONCPP_LIBRARIES)), but that was fixed when I installed libjsoncpp-dev
Using
FetchContent
, Drogon isn't building due to an issue finding Jsoncpp. This is a bug as Jsoncpp should be imported similar to Trantor, as a submodule. It seems to be required to add Jsoncpp yourself like described below.By itself in CMakeLists.txt, Jsoncpp builds and runs fine:
However Drogon does not seem to find it, specifically in
FindJsoncpp.cmake
with error:The include directory can be manually fixed with
set(CMAKE_INCLUDE_PATH "${CMAKE_CURRENT_BINARY_DIR}/_deps/jsoncpp-src/include")
however I cannot find a way to fixfind_library(JSONCPP_LIBRARIES ...)
. Thefind_library
method is looking for a *.a or *.so file I believe which does not exist in any of the built Jsoncpp directories. Is there a way to download Jsoncpp usingFetchContent
? It seems the only solution I have found, which I haven't tested yet, is to manually download Jsoncpp.Desktop (please complete the following information):
CMakeLists file:
The text was updated successfully, but these errors were encountered: