diff --git a/.travis.yml b/.travis.yml index f72de96d..2bd6e195 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,4 +18,6 @@ before_install: - sudo apt-get --yes install liblua5.2-dev - sudo apt-get --yes install libluajit-5.1-dev -script: ./bootstrap.py --ci --cxx=$CXX && ninja \ No newline at end of file +script: + - ./bootstrap.py --ci --lua-lib=lua5.2 --cxx=$CXX && ninja + - ./bootstrap.py --ci --lua-lib=lua5.1 --cxx=$CXX && ninja \ No newline at end of file diff --git a/bootstrap.py b/bootstrap.py index 6c2b59dc..048d6656 100755 --- a/bootstrap.py +++ b/bootstrap.py @@ -41,6 +41,7 @@ parser.add_argument('--debug', action='store_true', help='compile with debug fla parser.add_argument('--cxx', metavar='', help='compiler name to use (default: env.CXX=%s)' % cxx, default=cxx) parser.add_argument('--ci', action='store_true', help=argparse.SUPPRESS) parser.add_argument('--testing', action='store_true', help=argparse.SUPPRESS) +parser.add_argument('--lua-lib', help='lua library name (without the lib on *nix)', default='lua') parser.add_argument('--lua-dir', metavar='', help='directory lua is in with include and lib subdirectories') parser.add_argument('--install-dir', metavar='', help='directory to install the headers to', default=install_dir); parser.epilog = """In order to install sol, administrative privileges might be required. @@ -77,14 +78,17 @@ if args.lua_dir: include.extend([os.path.join(args.lua_dir, 'include')]) ldflags.extend(library_includes([os.path.join(args.lua_dir, 'lib')])) +if args.lua_lib: + include.extend([os.path.join(args.lua_dir, 'include')]) + ldflags.extend(library_includes([os.path.join(args.lua_dir, 'lib')])) + +ldflags.extend(libraries([args.lua_lib])) if args.ci: - ldflags.extend(libraries(['lua5.3'])) ldflags.extend(library_includes(['lib'])) - include.extend(['/usr/include/lua5.3', './lua-5.3.2/src', './include']) + include.extend(['/usr/include/' + args.lua_lib, './include']) cxxflags.extend(['-std=c++1y']) else: cxxflags.extend(['-std=c++14']) - ldflags.extend(libraries(['lua'])) if args.testing: cxxflags.append('-Wmissing-declarations')