New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CJSON discovery fails even if WITH_CJSON=OFF #2026
Comments
When using cmake to build the project, cJson discovery should only be performed if WITH_CJSON=ON. Closes eclipse#2026. Signed-off-by: Boris Feinstein <[email protected]>
It feels like the whole point of |
You're right, but logically if |
When building using cmake, and providing -DWITH_CJSON=OFF the cJson discovery process is still running and failing if I don't have cJson installed.
A simple fix in the main CMakeLists.txt will do the trick, surround the following block:
FIND_PACKAGE(cJSON)
if (CJSON_FOUND)
message(STATUS ${CJSON_FOUND})
else (CJSON_FOUND)
message(STATUS "Optional dependency cJSON not found. Some features will be disabled.")
endif(CJSON_FOUND)
with an :
if (WITH_CJSON)
...
endif()
That's all!
The text was updated successfully, but these errors were encountered: