Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Reindent Cmake files.
[simgrid.git] / buildtools / Cmake / Modules / FindLua51Simgrid.cmake
index eb95ff4..9f5ced9 100644 (file)
@@ -3,35 +3,35 @@ find_program(HAVE_LUA_BIN NAMES lua)
 
 message(STATUS "Looking for lua.h")
 if(LUA_INCLUDE_DIR)
-message(STATUS "Looking for lua.h - found")
+  message(STATUS "Looking for lua.h - found")
 else(LUA_INCLUDE_DIR)
-message(STATUS "Looking for lua.h - not found")
+  message(STATUS "Looking for lua.h - not found")
 endif(LUA_INCLUDE_DIR)
 
 if(HAVE_LUA_BIN)
-message(STATUS "Found Lua: ${HAVE_LUA_BIN}")
+  message(STATUS "Found Lua: ${HAVE_LUA_BIN}")
 endif(HAVE_LUA_BIN)
 
 set(LIB_LUA_NAME "")
 
 foreach(lib_path ${LUA_LIBRARIES})
   if(NOT LIB_LUA_NAME)
-  string(REGEX MATCH "liblua.*$" LIB_LUA_NAME "${lib_path}")
-  string(REPLACE ".${LIB_EXE}" "" LIB_LUA_NAME "${LIB_LUA_NAME}")
-  string(REPLACE "lib" "" LIB_LUA_NAME "${LIB_LUA_NAME}")
-  if(LIB_LUA_NAME)
-    string(REPLACE "/lib${LIB_LUA_NAME}.${LIB_EXE}" "" LUA_LIBRARY_DIR ${lib_path})
-  endif(LIB_LUA_NAME)
+    string(REGEX MATCH "liblua.*$" LIB_LUA_NAME "${lib_path}")
+    string(REPLACE ".${LIB_EXE}" "" LIB_LUA_NAME "${LIB_LUA_NAME}")
+    string(REPLACE "lib" "" LIB_LUA_NAME "${LIB_LUA_NAME}")
+    if(LIB_LUA_NAME)
+      string(REPLACE "/lib${LIB_LUA_NAME}.${LIB_EXE}" "" LUA_LIBRARY_DIR ${lib_path})
+    endif(LIB_LUA_NAME)
   endif(NOT LIB_LUA_NAME)
 endforeach(lib_path ${LUA_LIBRARIES})
 
 message(STATUS "Looking for lib lua")
 if(LUA_LIBRARY_DIR)
-message(STATUS "Looking for lib lua - found")
-message(STATUS "Lua version: ${LIB_LUA_NAME}")
-message(STATUS "Lib path   : ${LUA_LIBRARY_DIR}")
+  message(STATUS "Looking for lib lua - found")
+  message(STATUS "Lua version: ${LIB_LUA_NAME}")
+  message(STATUS "Lib path   : ${LUA_LIBRARY_DIR}")
 else(LUA_LIBRARY_DIR)
-message(STATUS "Looking for lib lua - not found")
+  message(STATUS "Looking for lib lua - not found")
 endif(LUA_LIBRARY_DIR)
 
 if(LUA51_FOUND)
@@ -39,5 +39,5 @@ if(LUA51_FOUND)
   include_directories(${LUA_INCLUDE_DIR})
   link_directories(${LUA_LIBRARY_DIR})
 else(LUA51_FOUND)
-       message(STATUS "Warning : Lua need version 5.1")
+  message(STATUS "Warning : Lua need version 5.1")
 endif(LUA51_FOUND)