Skip to content
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

"jansson_config.h" missing and cannot include the library in cmakelist #652

Open
Nonesence999 opened this issue Jun 25, 2023 · 2 comments
Open

Comments

@Nonesence999
Copy link

In jansson.h:

fatal error: jansson_config.h: No such file or directory
   15 | #include "jansson_config.h"
      |          ^~~~~~~~~~~~~~~~~~

Issue whit cmake (I cannot include it) :

add_subdirectory(library/jansson)
target_link_libraries(PORJECT PRIVATE jansson)
#include <jansson.h> -> 'jansson.h' file not found
#include ../library/jansson/src/jansson.h -> working
#include ../cmake-build-debug/library/jansson/include/jansson.h -> working
@akheron
Copy link
Owner

akheron commented Jul 9, 2024

I'm not an expert in CMake, but would #664 fix this issue, too?

@JosiahWI
Copy link

Yes, it would, because it will associate the headers with the target. When you write target_link_libraries(PROJECT PRIVATE jansson) the PUBLIC and INTERFACE dependencies of the jansson target will also become dependencies of the PROJECT target.

https://cmake.org/cmake/help/v3.1/command/target_link_libraries.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants