summaryrefslogtreecommitdiff
path: root/cmake/modules
diff options
context:
space:
mode:
authorJörg Mayer <jmayer@loplof.de>2013-05-04 23:06:15 +0000
committerJörg Mayer <jmayer@loplof.de>2013-05-04 23:06:15 +0000
commit6f872b0e178dcf23646bdbf0751541bbe05c8d91 (patch)
tree62e7ddba99cff904232980fe42a7319d4948f6d0 /cmake/modules
parent60fe9f1b9ee6297cc35f35b47cfc9506b4f0da7e (diff)
downloadwireshark-6f872b0e178dcf23646bdbf0751541bbe05c8d91.tar.gz
Attempted fix for https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8619
When there are several versions of lua installed, try to pick the library version that matches the include file(s) we selected. svn path=/trunk/; revision=49164
Diffstat (limited to 'cmake/modules')
-rw-r--r--cmake/modules/FindLUA.cmake7
1 files changed, 6 insertions, 1 deletions
diff --git a/cmake/modules/FindLUA.cmake b/cmake/modules/FindLUA.cmake
index e490fc105f..4c5577e9ea 100644
--- a/cmake/modules/FindLUA.cmake
+++ b/cmake/modules/FindLUA.cmake
@@ -38,10 +38,15 @@ if(LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/lua.h")
set( LUA_VERSION "500")
endif()
endif()
+string( REGEX REPLACE ".*[/\\]lua(.+)$" "\\1" LUA_INC_SUFFIX "${LUA_INCLUDE_DIR}" )
+if ( LUA_INCLUDE_DIR STREQUAL LUA_INC_SUFFIX )
+ set( LUA_INC_SUFFIX "")
+endif()
+message("LUA INCLUDE SUFFIX: ${LUA_INC_SUFFIX}")
FIND_LIBRARY(LUA_LIBRARY
- NAMES lua52 lua5.2 lua51 lua5.1 lua
+ NAMES lua${LUA_INC_SUFFIX} lua52 lua5.2 lua51 lua5.1 lua
HINTS
$ENV{LUA_DIR}
PATH_SUFFIXES lib64 lib