Set up CMake so that parson.h is included automatically?
adamski opened this issue · 1 comments
adamski commented
I'm still fairly new to CMake, and I had trouble working out how to make parson.h
available.
I ended up with
FetchContent_Declare(parson GIT_REPOSITORY https://github.com/kgabis/parson.git)
if (NOT parson_POPULATED)
FetchContent_Populate(parson)
add_subdirectory(${parson_SOURCE_DIR} ${parson_BINARY_DIR})
endif ()
# ...
target_include_directories(${PROJECT_NAME} PUBLIC ${parson_SOURCE_DIR})
# ...
Is there a way to automate adding the include directory into the target?
kgabis commented
Sorry, I don't know how to use CMake. Try asking on stackoverflow.