cJSON icon indicating copy to clipboard operation
cJSON copied to clipboard

Support target_include_directories for BUILD_INTERFACE

Open CedricLeon opened this issue 5 years ago • 1 comments

Hello, i'm using cJSON as part of a cmake superbuild. So cJSON is built along my project. But i can't just do #include <cJSON.h> since the folder containing this file isn't part of the public linking interface. It would be nice to add something like target_include_directories("${CJSON_LIB}" PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>) after add_library. Would you consider such change? I did an implementation on my own fork.

CedricLeon avatar Apr 25 '20 16:04 CedricLeon

I'm dealing with same situation and I think this should've been included into the CMake script as well.

KamranAghlami avatar Sep 20 '21 09:09 KamranAghlami