summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-01-26 15:40:36 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2017-01-26 15:40:36 (GMT)
commit6ee9efa883c19c7c1ebfba660c76d42551bbaee8 (patch)
tree5db03551b81d10ec02e72b64d1f389d4197ac85b /Modules
parenta45de72cc437a13179e933509d524d2088a86002 (diff)
parent2759e22575b9c63f3162a9629c2d8aa6b9d7effa (diff)
downloadCMake-6ee9efa883c19c7c1ebfba660c76d42551bbaee8.zip
CMake-6ee9efa883c19c7c1ebfba660c76d42551bbaee8.tar.gz
CMake-6ee9efa883c19c7c1ebfba660c76d42551bbaee8.tar.bz2
Merge topic 'FindLua-versioned-lib'
2759e225 FindLua: try to find library according to version from header
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindLua.cmake16
1 files changed, 9 insertions, 7 deletions
diff --git a/Modules/FindLua.cmake b/Modules/FindLua.cmake
index c777970..b59b9b3 100644
--- a/Modules/FindLua.cmake
+++ b/Modules/FindLua.cmake
@@ -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