misc/liblua/CMakeLists.txt
changeset 9205 abce6011f86c
parent 8316 89232b2fa1d6
child 9208 acb2492288e5
--- a/misc/liblua/CMakeLists.txt	Wed Jun 12 01:04:30 2013 +0200
+++ b/misc/liblua/CMakeLists.txt	Wed Jun 12 01:26:42 2013 +0200
@@ -4,17 +4,22 @@
 
 if(WIN32)
     add_definitions(-DLUA_BUILD_AS_DLL)
-    add_library(lua SHARED ${lua_src})
-
-    set(LUA_LIBRARY lua.dll)
-
-    set_target_properties(lua PROPERTIES PREFIX "")
-    install(TARGETS lua RUNTIME DESTINATION ${target_library_install_dir})
 else(WIN32)
     add_definitions(-DLUA_USE_LINUX)
-    add_library(lua STATIC ${lua_src})
-    set(LUA_LIBRARY lua)
+    add_definitions(-fvisibility=default) #TODO: fixme
 endif(WIN32)
 
+add_library(lua ${lua_src})
+
+set_target_properties(lua PROPERTIES
+                          VERSION "5.1.4"
+                          SOVERSION 1)
+install(TARGETS lua RUNTIME DESTINATION ${target_binary_install_dir}
+                    LIBRARY DESTINATION ${target_library_install_dir}
+                    ARCHIVE DESTINATION ${target_library_install_dir})
+get_target_property(lua_fullpath lua LOCATION)
+
+set(LUA_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE STRING "" FORCE)
+set(LUA_LIBRARY ${lua_fullpath} CACHE STRING "" FORCE)