FindLua: only mark LUA_MATH_LIBRARY as advanced if required

This commit is contained in:
Ben Boeckel 2019-12-19 11:55:13 -05:00
parent 85cd26b8a6
commit 7cc02a0c29

View File

@ -211,6 +211,7 @@ if (LUA_LIBRARY)
# include the math library for Unix
if (UNIX AND NOT APPLE AND NOT BEOS)
find_library(LUA_MATH_LIBRARY m)
mark_as_advanced(LUA_MATH_LIBRARY)
set(LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}")
# include dl library for statically-linked Lua library
@ -232,6 +233,6 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua
REQUIRED_VARS LUA_LIBRARIES LUA_INCLUDE_DIR
VERSION_VAR LUA_VERSION_STRING)
mark_as_advanced(LUA_INCLUDE_DIR LUA_LIBRARY LUA_MATH_LIBRARY)
mark_as_advanced(LUA_INCLUDE_DIR LUA_LIBRARY)
cmake_policy(POP)