Skip to content
Snippets Groups Projects
Commit 6ee9efa8 authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'FindLua-versioned-lib'

2759e225 FindLua: try to find library according to version from header
parents a45de72c 2759e225
No related branches found
No related tags found
No related merge requests found
......@@ -75,16 +75,9 @@ function(_lua_set_version_vars)
include/lua${CMAKE_MATCH_1}.${CMAKE_MATCH_2}
include/lua-${CMAKE_MATCH_1}.${CMAKE_MATCH_2}
)
list(APPEND _lua_library_names
lua${CMAKE_MATCH_1}${CMAKE_MATCH_2}
lua${CMAKE_MATCH_1}.${CMAKE_MATCH_2}
lua-${CMAKE_MATCH_1}.${CMAKE_MATCH_2}
lua.${CMAKE_MATCH_1}.${CMAKE_MATCH_2}
)
endforeach ()
set(_lua_include_subdirs "${_lua_include_subdirs}" PARENT_SCOPE)
set(_lua_library_names "${_lua_library_names}" PARENT_SCOPE)
set(_lua_append_versions "${_lua_append_versions}" PARENT_SCOPE)
endfunction(_lua_set_version_vars)
......@@ -152,6 +145,15 @@ endif ()
unset(_lua_include_subdirs)
unset(_lua_append_versions)
if (LUA_VERSION_STRING)
set(_lua_library_names
lua${LUA_VERSION_MAJOR}${LUA_VERSION_MINOR}
lua${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}
lua-${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}
lua.${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}
)
endif ()
find_library(LUA_LIBRARY
NAMES ${_lua_library_names} lua
HINTS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment