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

glad not exported when built locally #389

Open
6 tasks
ryan0270 opened this issue Jan 21, 2024 · 0 comments
Open
6 tasks

glad not exported when built locally #389

ryan0270 opened this issue Jan 21, 2024 · 0 comments

Comments

@ryan0270
Copy link

Bug category

  • [x ] bug - compilation error
  • bug - compilation warning
  • bug - runtime error
  • bug - runtime warning
  • bug - logic error

Describe the bug
When MATPLOTPP_BUILD_EXPERIMENTAL_OPENGL_BACKEND=ON I get the following error during cmake configure.

CMake Error: install(EXPORT "Matplot++Targets" ...) includes target "matplot_opengl" which requires target "glad" that is not in any export set.

In my case, find_package(GLAD) does not find anything so FetchContent is used to download glad. Cmake is complaining that matplot_opengl depends on a local target, glad, that won't be installed.

I suspect the solution is to append it to the TARGETS list if built locally, but there may be some other subtleties I'm not considering.

Steps to Reproduce

# This is part on Arch Linux AUR build() step
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX="$pkgdir/usr" \
      -DBUILD_SHARED_LIBS=ON \
      -DMATPLOTPP_BUILD_EXPERIMENTAL_OPENGL_BACKEND=ON \
      -DMATPLOTPP_BUILD_EXAMPLES=OFF \
      -DMATPLOTPP_BUILD_TESTS=OFF \

Output

CMake Error: install(EXPORT "Matplot++Targets" ...) includes target "matplot_opengl" which requires target "glad" that is not in any export set.

Platform

  • [ x] cross-platform issue - linux
  • cross-platform issue - windows
  • cross-platform issue - macos

Environment Details:

  • OS: Arch Linux
  • OS Version: Jan 2024
  • Compiler: gcc
  • Compiler version: 13.2

Additional context

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

No branches or pull requests

1 participant