misc/liblua/CMakeLists.txt
author koda
Wed, 12 Jun 2013 01:26:42 +0200
changeset 9205 abce6011f86c
parent 8316 89232b2fa1d6
child 9208 acb2492288e5
permissions -rw-r--r--
aaaaand let's not forget about lua, which has also a slightly revised build process

#this file is included only when system Lua library is not found

file(GLOB lua_src *.c *.h)

if(WIN32)
    add_definitions(-DLUA_BUILD_AS_DLL)
else(WIN32)
    add_definitions(-DLUA_USE_LINUX)
    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)