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

Fix CMake library include_directories #335

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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