matplotlib-cpp
matplotlib-cpp copied to clipboard
Fix CMake library include_directories
Fixes two things:
matplotib_cpptarget requires$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>to be used withadd_subdirectoryso thatmatplotlibcpp.hcan be included seamlessly- There are no headers within the
examplessubdirectory, therefore the$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/examples>is useless
@lava can we get this one merged?
Adding $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}> also fixes the use case for including matplotlib-cpp in cmake with FetchContent:
include(FetchContent)
FetchContent_Declare(matplotlibcpp
GIT_REPOSITORY https://github.com/lava/matplotlib-cpp.git
GIT_TAG ef0383f1315d32e0156335e10b82e90b334f6d9f
)
FetchContent_MakeAvailable(matplotlibcpp)