misc/liblua/CMakeLists.txt
author koda
Mon, 07 May 2012 14:53:08 +0200
changeset 7031 d5ea24399a48
parent 5171 f9283dc4860d
child 7262 33e703cc7a7f
permissions -rw-r--r--
when Lua is not found, fallback to compiling the one that comes bundled in our sources
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7031
d5ea24399a48 when Lua is not found, fallback to compiling the one that comes bundled in our sources
koda
parents: 5171
diff changeset
     1
#this file is included only when system Lua library is not found
d5ea24399a48 when Lua is not found, fallback to compiling the one that comes bundled in our sources
koda
parents: 5171
diff changeset
     2
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3244
diff changeset
     3
file(GLOB lua_src *.c *.h)
2822
0533562bc3a4 Engine:
smxx
parents: 2812
diff changeset
     4
set(LIBRARY_OUTPUT_PATH ${EXECUTABLE_OUTPUT_PATH})
0533562bc3a4 Engine:
smxx
parents: 2812
diff changeset
     5
7031
d5ea24399a48 when Lua is not found, fallback to compiling the one that comes bundled in our sources
koda
parents: 5171
diff changeset
     6
if(WIN32)
d5ea24399a48 when Lua is not found, fallback to compiling the one that comes bundled in our sources
koda
parents: 5171
diff changeset
     7
    add_definitions(-DLUA_BUILD_AS_DLL)
d5ea24399a48 when Lua is not found, fallback to compiling the one that comes bundled in our sources
koda
parents: 5171
diff changeset
     8
    add_library(lua SHARED ${lua_src})
2822
0533562bc3a4 Engine:
smxx
parents: 2812
diff changeset
     9
7031
d5ea24399a48 when Lua is not found, fallback to compiling the one that comes bundled in our sources
koda
parents: 5171
diff changeset
    10
    set_target_properties(lua PROPERTIES PREFIX "")
d5ea24399a48 when Lua is not found, fallback to compiling the one that comes bundled in our sources
koda
parents: 5171
diff changeset
    11
    install(TARGETS lua RUNTIME DESTINATION ${target_dir})
d5ea24399a48 when Lua is not found, fallback to compiling the one that comes bundled in our sources
koda
parents: 5171
diff changeset
    12
else(WIN32)
d5ea24399a48 when Lua is not found, fallback to compiling the one that comes bundled in our sources
koda
parents: 5171
diff changeset
    13
    add_definitions(-DLUA_USE_LINUX)
d5ea24399a48 when Lua is not found, fallback to compiling the one that comes bundled in our sources
koda
parents: 5171
diff changeset
    14
    add_library(lua STATIC ${lua_src})
2822
0533562bc3a4 Engine:
smxx
parents: 2812
diff changeset
    15
endif(WIN32)
0533562bc3a4 Engine:
smxx
parents: 2812
diff changeset
    16
0533562bc3a4 Engine:
smxx
parents: 2812
diff changeset
    17
0533562bc3a4 Engine:
smxx
parents: 2812
diff changeset
    18