misc/liblua/CMakeLists.txt
author antonc27 <antonc27@mail.ru>
Sat, 08 Aug 2015 21:37:19 +0200
branchios-revival
changeset 11085 18722e5bd386
parent 10015 4feced261c68
child 11664 71bdf987e41f
permissions -rw-r--r--
- Fix for compiling 'uRender.pas' Note: Construction "{$IF GLunit = gles11}" are not valid at all! Assumptions: We are not using pas2c and using OpenGL ES 1.1

#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
                          OUTPUT_NAME ${lua_output_name})
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 "Lua include dir" FORCE)
set(LUA_LIBRARY ${lua_fullpath} CACHE STRING "Lua library" FORCE)