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
```console
CMake Error: install(EXPORT "Matplot++Targets" ...) includes target "matplot_opengl" which requires target "glad" that is not in any export set.
```
Bug category
Describe the bug When
MATPLOTPP_BUILD_EXPERIMENTAL_OPENGL_BACKEND=ON
I get the following error during cmake configure.In my case,
find_package(GLAD)
does not find anything soFetchContent
is used to download glad. Cmake is complaining thatmatplot_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
Output
Platform
Environment Details:
Additional context