From 8add60b019c6f7486fda4719e0b630d6fb0c2fdd Mon Sep 17 00:00:00 2001 From: Alex Orlenko Date: Wed, 14 Apr 2021 22:25:36 +0100 Subject: [PATCH] Don't check LUA_LIB_NAME if it's not needed --- build/find_normal.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/find_normal.rs b/build/find_normal.rs index 0edc22c..1a0a3c5 100644 --- a/build/find_normal.rs +++ b/build/find_normal.rs @@ -17,7 +17,7 @@ pub fn probe_lua() -> PathBuf { let need_lua_lib = cfg!(any(not(feature = "module"), target_os = "windows")); if include_dir != "" && (!need_lua_lib || lib_dir != "") { - if lua_lib == "" { + if need_lua_lib && lua_lib == "" { panic!("LUA_LIB_NAME is not set"); } let _version = use_custom_lua(&include_dir, &lib_dir, &lua_lib).unwrap();