Don't check LUA_LIB_NAME if it's not needed

This commit is contained in:
Alex Orlenko 2021-04-14 22:25:36 +01:00
parent c363fb9288
commit 8add60b019
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ pub fn probe_lua() -> PathBuf {
let need_lua_lib = cfg!(any(not(feature = "module"), target_os = "windows")); let need_lua_lib = cfg!(any(not(feature = "module"), target_os = "windows"));
if include_dir != "" && (!need_lua_lib || lib_dir != "") { if include_dir != "" && (!need_lua_lib || lib_dir != "") {
if lua_lib == "" { if need_lua_lib && lua_lib == "" {
panic!("LUA_LIB_NAME is not set"); panic!("LUA_LIB_NAME is not set");
} }
let _version = use_custom_lua(&include_dir, &lib_dir, &lua_lib).unwrap(); let _version = use_custom_lua(&include_dir, &lib_dir, &lua_lib).unwrap();