micro-gl
micro-gl copied to clipboard
"add_subdirectory(/path/to/microgl)" is not usable
Please, remove examples from root CMakeLists.txt, because it's broke build process:
example_blocks_3d_raster.cpp:(.text+0x1323): undefined reference to `SDL_Init'
/usr/bin/ld: example_blocks_3d_raster.cpp:(.text+0x1353): undefined reference to `SDL_CreateWindow'
/usr/bin/ld: example_blocks_3d_raster.cpp:(.text+0x1373): undefined reference to `SDL_CreateRenderer'
/usr/bin/ld: example_blocks_3d_raster.cpp:(.text+0x13ac): undefined reference to `SDL_CreateTexture'
/usr/bin/ld: example_blocks_3d_raster.cpp:(.text+0x146e): undefined reference to `SDL_PollEvent'
/usr/bin/ld: example_blocks_3d_raster.cpp:(.text+0x1510): undefined reference to `SDL_UpdateTexture'
/usr/bin/ld: example_blocks_3d_raster.cpp:(.text+0x151c): undefined reference to `SDL_RenderClear'
/usr/bin/ld: example_blocks_3d_raster.cpp:(.text+0x1536): undefined reference to `SDL_RenderCopy'
/usr/bin/ld: example_blocks_3d_raster.cpp:(.text+0x1542): undefined reference to `SDL_RenderPresent'
/usr/bin/ld: example_blocks_3d_raster.cpp:(.text+0x1563): undefined reference to `SDL_DestroyWindow'
/usr/bin/ld: example_blocks_3d_raster.cpp:(.text+0x1568): undefined reference to `SDL_Quit'
@Azq2 We actually use it as part of the CI and build testing in the cloud. There might be an issue with this example, i will test it
@Azq2 We actually use it as part of the CI and build testing in the cloud. There might be an issue with this example, i will test it
I use microgl in embedded projects with cross compiling. In my problem find_package() finds SDL2 headers from the host package libsdl2-dev which is for amd64. But I build my project for arm-linux-gnueabi with a "libc only" environment.
Maybe this is more my problem and I should simply turn off pkg-config in cmake.
But, I think if(DEFINED SDL2_FOUND)
is not enough for skipping tests.
Maybe one of these variants is cleaner for the library users:
- Tests are disabled by default, but can be enabled with option.
- Tests are enabled by default, but can be disabled with option.
Hi @Azq2 I get it. Do you have a proposition ? Maybe adding a flag through cmake to add examples ? I am open to that
- Tests are enabled by default, but can be disabled with option.
I prefer with this one, to make sure the micro-gl is usable and reliable.