Skip to content

Conversation

WildRackoon
Copy link

Fixes two things:

  • matplotib_cpp target requires $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}> to be used with add_subdirectory so that matplotlibcpp.h can be included seamlessly
  • There are no headers within the examples subdirectory, therefore the $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/examples> is useless

@plusk01
Copy link

plusk01 commented Jan 28, 2023

@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)

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

Successfully merging this pull request may close these issues.

2 participants