aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/modules/FindLUA.cmake
AgeCommit message (Collapse)AuthorFilesLines
2018-12-29Windows: fix handling of Unicode paths in LuaPeter Wu1-1/+1
Lua internally uses ANSI C APIs (such as fopen). On many systems (macOS and Linux for example) these work fine with UTF-8. Windows however requires special Unicode APIs (such as _wfopen), so patch the Lua library to interpret paths are UTF-8 and call appropriate Unicode APIs. Changes compared to the previous LuaBinaries zip archive: - Patched with UTF-8 support for loadfile, os.execute, etc. - Built with VS 2015 (VCRUNTIME140.dll) instead of MinGW (MSVCRT.dll). - Includes PDB file for lua52.dll - Includes lua52.exe and luac52.exe with UTF-8 argv support (wmain). - Includes build scripts, source files and README.md. - Extra subdirectory named after the zip file. These zip files are taken from https://github.com/Lekensteyn/lua-unicode (the "prepared" source zips can be found here as well.) Bug: 15118 Change-Id: I219f046d6e0fd5093287b5d6503a48ba7d1fc6a4 Reviewed-on: https://code.wireshark.org/review/31165 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-07cmake: optionally require Lua 5.1 or newerPeter Wu1-4/+2
doc/README.wslua reports support for 5.1 and 5.2 only. Even RHEL6 ships with Lua 5.1, so it makes not sense to maintain support for Lua 5.0. Change-Id: I34a8084c7fba19d631b90ce5d5a28198be6a7850 Reviewed-on: https://code.wireshark.org/review/29448 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-07-16Lua: add include/lua-5.1 and include/lua-5.2 to CMake path suffixesPascal Quantin1-1/+1
Bug: 14983 Change-Id: I8be206ace7f61c62e2e42bc53841067ec39e3a0a Reviewed-on: https://code.wireshark.org/review/28726 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2017-11-18CMake: Clean up Windows buildGraham Bloice1-4/+6
Remove options that aren't supported on Windows Don't use pkgconfig on Windows Change-Id: I79718a1c43f56a9ec88f690490931b80b727dd68 Reviewed-on: https://code.wireshark.org/review/24481 Reviewed-by: Graham Bloice <graham.bloice@trihedral.com> Petri-Dish: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-15FindLUA.cmake: reject version 5.3Peter Wu1-14/+22
Lua 5.3 could still be used when located at /usr/include/lua.h. Detect and reject it in that case. Rename LUA_VERSION to LUA_VERSION_NUM to avoid a conflict with pkg-config (which uses a different version format). Ensure that the regex matches a number only. Bug: 11706 Change-Id: Idb7e3e1a8d9c6e4ab9ab1816c4dedea7de9dde8e Reviewed-on: https://code.wireshark.org/review/11836 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-06-08Update how we search for Lua with pkg-config.Jeff Morriss1-1/+4
First, search for packages with the version number without the period (bug 11219). Second, don't look for Lua 5.3 because we don't work with it. If what we find (without pkg-config's help) is Lua 5.3, disable Lua support (bug 10881). Cmake support by Peter Wu (originally Ie73e5b53640f10432881a9671c0a605f7f027ed8): Note the check for "lua<=5.2.99" instead of "lua<5.3" since cmake does not support the latter syntax. Tested with lua5.2, lua5.1 and lua (5.3) installed. Bug: 11219 Ping-Bug: 10881 Change-Id: I382d07ca00eafc6111cd4e9faa2b66f6b8f95b6e Reviewed-on: https://code.wireshark.org/review/8783 Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-04-20CMake minor updatesGraham Bloice1-3/+0
Fix up generation messages for Windows build Remove some superfluous Lua messages Change-Id: I405e7edfcb043fc842fe4f0cca8d23d5755527f9 Reviewed-on: https://code.wireshark.org/review/8138 Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2015-01-13CMake: Copy libwireshark dependent DLLs to the target directory.Gerald Combs1-4/+20
Add a "copy_cli_dlls" target which copies the DLLs required to run our command line programs to the run directory. Fix the spelling of "KERBEROS". Start filling in variables so that we can populate config.nsh. Change-Id: I9b3ed912dfbffecbf09f2893efa2c9d82e709521 Reviewed-on: https://code.wireshark.org/review/6513 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-04CMake: Don't cache LUA_LIBRARIES.Gerald Combs1-1/+1
Don't cache the LUA_LIBRARIES variable. This matches the behavior of the other library modules and fixes a compilation problem on my machine where /usr/local/lib/liblua.dylib wasn't showing up in the various build.make and link.txt files. Change-Id: Ib75ef303f2e67b266a246621718d0ea2ab885dca Reviewed-on: https://code.wireshark.org/review/5603 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-01cmake: use pkg-config for resolving dependenciesPeter Wu1-2/+7
Changes: * Fix glib2 search path. * Add pkg-config support to CAP, GEOIP, GNUTLS, LUA, PortAudio (API 19), zlib, kerberos. * Add pkg-config support to libnl3, libnl2 and libnl1 (but tested only with libnl3). This makes it easier to do 32-bit builds on 64-bit hosts by just setting `PKG_CONFIG_LIBDIR`. Due to how HINTS work, it is still fragile though: missing 32-bit libraries will cause a fallback to 64-bit libraries. A future patch could check for `<PREFIX>_FOUND` and remove the manual `find_path` and `find_library` hackery since the paths are already known. Change-Id: Ieb4fb74695c96afb1a4c70168e84abb1fa4612c6 Reviewed-on: https://code.wireshark.org/review/4292 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31Continue to remove $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^\# \$Id\$/,+1 d') (start with dash) Change-Id: Ia4b5a6c2302f6a531f6a86c1ec3a2f8205c8c2dd Reviewed-on: https://code.wireshark.org/review/881 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2013-09-23Beginnings of win cmake support (not yet working), created by Graham Bloice,Jörg Mayer1-0/+4
some smaller changes by me. - README.cmake Document how to (one day) run on Windows - CMakeLists.txt Use MSVC compiler flags for MSVC instead of gcc flags - FindWSWinLibs.cmake New: Creates HINTS for finding includes and libraries inside the Wireshark support library installation. - FindXXX.cmake Make use of HINTS generated by FindWSWinLibs.cmake This has not really been tested on Windows as my installation seems to have automagically downloaded some fixes and is in an inconsistent state since. Will probably need to reinstall. svn path=/trunk/; revision=52194
2013-05-04Attempted fix for https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8619Jörg Mayer1-1/+6
When there are several versions of lua installed, try to pick the library version that matches the include file(s) we selected. svn path=/trunk/; revision=49164
2013-05-01Print the version of the include files that will be used.Jörg Mayer1-0/+11
svn path=/trunk/; revision=49106
2012-08-25Have CMake also consider the include path "lua5.2" (note the dot),Evan Huus1-1/+1
since that is where it can be found on recent Ubuntus, and without it you get a mix of 5.1 includes and 5.2 libraries, which breaks the build. svn path=/trunk/; revision=44669
2012-06-17Try to detect Lua 5.2 as wellJörg Mayer1-3/+3
svn path=/trunk/; revision=43307
2009-09-23- Add $Id: $ tagsJörg Mayer1-0/+3
- FindHtmlViewer.cmake: Try to add reading the name of the html viewer from the HTML_VIEWER environment variable (untested) svn path=/trunk/; revision=30104
2009-09-09CMAKE: Get most of of missing *build* pieces into placeJörg Mayer1-0/+60
svn path=/trunk/; revision=29819