Add selection of system LUA and BULLET libs#541
Add selection of system LUA and BULLET libs#541carlo-bramini wants to merge 1 commit intoopentomb:masterfrom carlo-bramini:master
Conversation
|
thanks, good idea... I will try to review the changes. |
|
I have set a variable called LUA_MIN_VERSION for checking the minimum version of the LUA package. |
|
Hi, |
|
I was forced to change #include <lua.h> to #include "lua.h", othewise I got an error when compiling with VisualStudio 2017. |
|
Hi @carlo-bramini, maybe you can do another pull request containing bullet-related modifications only, so they get included (they were working fine on Linux). Lua stuff could be done in a second time. |
This patch includes support for selecting system provided LUA 5.3 (and newer) and BULLET, in a similar manner it had been done for FreeType.
Added two new options, FORCE_SYSTEM_LUA and FORCE_SYSTEM_BULLET. By default, they are OFF so the internal copies or the libraries will be used without parameters. LUA is accepted only if version 5.3 or newer is found.
Added a new file, src/core/lua.h, used for including LUA stuff.
Inside src/core/lua.h, include directive has been changed from:
#include <lua.h>to:
#include "lua.h"as it has been written in the CMAKE documentation:
https://cmake.org/cmake/help/v3.0/module/FindLua.html
Tested with MINGW-W64 cross compiler: LUA 5.2 is rejected, BULLET is not found.
Tested with MSVC Community 2017: LUA 5.3 and BULLET are found and accepted.