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
I am using jsoncpp library in my cmake project. So what I am trying to do is installing the jsoncpp library in my system and then in CMakeLists.txt, I add the instruction to find the package and use it. I am doing this following below steps :
Then in my CMakeLists.txt, I add below two lines:
FIND_PACKAGE(jsoncpp REQUIRED)
TARGET_LINK_LIBRARIES(myProject jsoncpp)
But I am getting below error:
CMake Error at CMakeLists.txt:249 (FIND_PACKAGE):
By not providing "Findjsoncpp.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "jsoncpp", but
CMake did not find one.
Could not find a package configuration file provided by "jsoncpp" with any
of the following names:
jsoncppConfig.cmake
jsoncpp-config.cmake
Add the installation prefix of "jsoncpp" to CMAKE_PREFIX_PATH or set
"jsoncpp_DIR" to a directory containing one of the above files. If
"jsoncpp" provides a separate development package or SDK, be sure it has
been installed.
I don't know what am I missing ??
The text was updated successfully, but these errors were encountered:
I am using jsoncpp library in my cmake project. So what I am trying to do is installing the jsoncpp library in my system and then in CMakeLists.txt, I add the instruction to find the package and use it. I am doing this following below steps :
cd /repo && wget -c https://github.com/open-source-parsers/jsoncpp/archive/1.8.4.zip &&
unzip 1.8.4.zip && cd /repo/jsoncpp-1.8.4 &&
mkdir build && cd build &&
cmake -DCMAKE_BUILD_TYPE=Release -DJSONCPP_WITH_TESTS=OFF -DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF .. &&
make install
Then in my CMakeLists.txt, I add below two lines:
FIND_PACKAGE(jsoncpp REQUIRED)
TARGET_LINK_LIBRARIES(myProject jsoncpp)
But I am getting below error:
CMake Error at CMakeLists.txt:249 (FIND_PACKAGE):
By not providing "Findjsoncpp.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "jsoncpp", but
CMake did not find one.
Could not find a package configuration file provided by "jsoncpp" with any
of the following names:
Add the installation prefix of "jsoncpp" to CMAKE_PREFIX_PATH or set
"jsoncpp_DIR" to a directory containing one of the above files. If
"jsoncpp" provides a separate development package or SDK, be sure it has
been installed.
I don't know what am I missing ??
The text was updated successfully, but these errors were encountered: