Browse Source

Moved our custom FindLua.cmake into v2fixes directory and only use this version when not using CMake 3 or later, when using later versions of CMake the built in FindLua is used to ensure we're always using the latest version

David Wimsey 11 years ago
parent
commit
b0df057567
2 changed files with 5 additions and 1 deletions
  1. 5 1
      Build/CMakeLists.txt
  2. 0 0
      Build/cmake/v2fixes/FindLua-v2fix.cmake

+ 5 - 1
Build/CMakeLists.txt

@@ -158,7 +158,11 @@ endif()
 
 #Lua
 if(BUILD_LUA_BINDINGS)
-    find_package(Lua)
+    if(CMAKE_MAJOR_VERSION LESS 3)
+        find_package(Lua-v2fix)
+    else()
+        find_package(Lua)
+    endif()
     if(LUA_FOUND)
         include_directories(${LUA_INCLUDE_DIR})
         list(APPEND LUA_BINDINGS_LINK_LIBS ${LUA_LIBRARIES})

+ 0 - 0
Build/cmake/FindLua.cmake → Build/cmake/v2fixes/FindLua-v2fix.cmake