minetest/irrlicht

Building with SDL2 tried to pull in X11_xi

nephele-gh opened this issue · 1 comments

I can produce the exact error if needed, this was observed under haiku building with sdl2, cmake conplained that it wanted x11_xi but it was not found.
setting the var to an empty variable made the build suceed

this may be an artifact of me tunning cmake once without arguments and then ccmake to get a configuration to modify.

Wow. Haiku.

this may be an artifact of me running cmake once without arguments and then ccmake to get a configuration to modify.

I think on first run it defaulted to X11 and set X11_Xi_LIB to something like X11_Xi-NOTFOUND and failed; then you switched it to SDL but it is written to link what is in X11_Xi_LIB unconditionally, and CMake detects and fails any attempt to link in anything marked as NOTFOUND. The proper fix would be to not rely on X11 variables being empty on non-X11 and only use them if USE_X11 is true.