Hey; I'm trying to write a new rockspec for Lua-SDL2[1], using the
"builtin" backend so that users won't need CMake installed.

I'm having trouble cleanly configuring it to find the SDL2 headers.

Context:
LibSDL2 normally installs its headers to /usr/include/SDL2/; however,
certain platforms install to other locations, which may not necessarily
end in an SDL2/ folder.

If I search for "SDL2/SDL_scancode.h" in external_dependencies and
include "$(SDL2_INCDIR)/SDL2" in incdirs, then the rock builds just fine
on my machine; however, unusual platforms would not be able to override
with a usable SDL2_INCDIR, since it assumes the existence of SDL2/.

If I search for just "SDL_scancode.h" and reference just
"$(SDL2_INCDIR)", then any platform can be directed to the right
location. But, luarocks doesn't know to search /usr/include/SDL2, so now
*every* platform needs manual configuration to build the rock.

Am I missing a way to give LuaRocks "hints" to augment its search path
with subdirectories of the platform defaults?

Any pointers would be appreciated;
~Joseph Wallace

[1]: https://github.com/Tangent128/luasdl2/tree/luarocks-builtin

------------------------------------------------------------------------------
_______________________________________________
Luarocks-developers mailing list
Luarocks-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/luarocks-developers

Reply via email to