Skip to content

Could not find a package configuration file provided by "nlohmann_json" while integrating the json library into Cmake project #2317

Answered by MdAnayat
MdAnayat asked this question in Q&A
Discussion options

You must be logged in to vote

I have followed another approach to solve this problem. I have downloaded the latest json.hpp file from the repository and modified my CMakeLists.txt file as follows:

cmake_minimum_required (VERSION 3.5)

project(sign)

find_package(OpenCV REQUIRED)

include_directories(${OpenCV_INCLUDE_DIRS})

include_directories(include)

add_executable(sign_detect sign_detect.cpp include/json.hpp)

target_link_libraries(sign_detect ${OpenCV_LIBS})

Now the code compilation is okay

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@MdAnayat
Comment options

@nlohmann
Comment options

Comment options

You must be logged in to vote
1 reply
@nlohmann
Comment options

Answer selected by nlohmann
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants