fix non-versioned lua not search in cmake

"FOREACH" ignore empty elements, but "FOREACH IN LISTS" include emoty elements.
https://cmake.org/cmake/help/latest/command/foreach.html
This commit is contained in:
yokogawa-k 2018-03-26 17:11:29 +09:00
parent 9b47a1f8fe
commit 0af99d8d5b
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ SET(_POSSIBLE_LUA_INCLUDE include include/lua)
SET(_POSSIBLE_SUFFIXES "52" "5.2" "-5.2" "53" "5.3" "-5.3" "")
# Set up possible search names and locations
FOREACH(_SUFFIX ${_POSSIBLE_SUFFIXES})
FOREACH(_SUFFIX IN LISTS _POSSIBLE_SUFFIXES)
LIST(APPEND _POSSIBLE_LUA_INCLUDE "include/lua${_SUFFIX}")
LIST(APPEND _POSSIBLE_LUA_EXECUTABLE "lua${_SUFFIX}")
LIST(APPEND _POSSIBLE_LUA_COMPILER "luac${_SUFFIX}")