# HG changeset patch
# User koda
# Date 1348526149 -7200
# Node ID b25add2fdfa6b0802584ded4ab96787bb62a7339
# Parent  78d2ac987f415d3c8e5d15897f7269e84b4112f4
slight tweak to lua linking (that will break everything, i'm sure)

diff -r 78d2ac987f41 -r b25add2fdfa6 CMakeLists.txt
--- a/CMakeLists.txt	Sat Sep 22 19:14:58 2012 +0400
+++ b/CMakeLists.txt	Tue Sep 25 00:35:49 2012 +0200
@@ -217,11 +217,7 @@
     message(STATUS "Lua library not found, building bundled dependency")
     add_subdirectory(misc/liblua)
     #linking with liblua.a requires system readline -- this works everywhere, right?
-    if(WIN32)
-        set(pascal_flags "-k${CMAKE_BINARY_DIR}/bin/liblua.dll.a" "-k-lreadline" ${pascal_flags})
-    else()
-        set(pascal_flags "-k${CMAKE_BINARY_DIR}/bin/liblua.a" "-k-lreadline" ${pascal_flags})
-    endif()
+    set(pascal_flags "-k${EXECUTABLE_OUTPUT_PATH}/lib${LUA_LIBRARY}.a" "-k-lreadline" ${pascal_flags})
 endif()
 
 add_subdirectory(hedgewars)
diff -r 78d2ac987f41 -r b25add2fdfa6 misc/liblua/CMakeLists.txt
--- a/misc/liblua/CMakeLists.txt	Sat Sep 22 19:14:58 2012 +0400
+++ b/misc/liblua/CMakeLists.txt	Tue Sep 25 00:35:49 2012 +0200
@@ -14,6 +14,7 @@
 else(WIN32)
     add_definitions(-DLUA_USE_LINUX)
     add_library(lua STATIC ${lua_src})
+    set(LUA_LIBRARY lua)
 endif(WIN32)