diff options
author | Tycho Bickerstaff <work.tycho@gmail.com> | 2013-12-19 00:14:11 +0100 |
---|---|---|
committer | Tycho Bickerstaff <work.tycho@gmail.com> | 2013-12-19 00:14:11 +0100 |
commit | 0dbd55614bf8146187d459ea7faa110a4bae1f2f (patch) | |
tree | c2ff954388d70d1febdcb1f5810c6d93972859d3 /lib/lua/CMakeLists.txt | |
parent | added zlib and UI (diff) | |
download | cuberite-0dbd55614bf8146187d459ea7faa110a4bae1f2f.tar cuberite-0dbd55614bf8146187d459ea7faa110a4bae1f2f.tar.gz cuberite-0dbd55614bf8146187d459ea7faa110a4bae1f2f.tar.bz2 cuberite-0dbd55614bf8146187d459ea7faa110a4bae1f2f.tar.lz cuberite-0dbd55614bf8146187d459ea7faa110a4bae1f2f.tar.xz cuberite-0dbd55614bf8146187d459ea7faa110a4bae1f2f.tar.zst cuberite-0dbd55614bf8146187d459ea7faa110a4bae1f2f.zip |
Diffstat (limited to 'lib/lua/CMakeLists.txt')
-rw-r--r-- | lib/lua/CMakeLists.txt | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/lua/CMakeLists.txt b/lib/lua/CMakeLists.txt new file mode 100644 index 000000000..526be7a46 --- /dev/null +++ b/lib/lua/CMakeLists.txt @@ -0,0 +1,29 @@ + +cmake_minimum_required (VERSION 2.6) +project (lua) + +include_directories ("${PROJECT_SOURCE_DIR}/../../src/") + +file(GLOB SOURCE + "*.c" +) + +list(REMOVE_ITEM SOURCE "${PROJECT_SOURCE_DIR}/lua.c") + +if ((${CMAKE_GENERATOR} MATCHES "Unix Makefiles") AND (NOT LUA_CMAKE_BUILD)) + if(NOT ${PROJECT_SOURCE_DIR} MATCHES ${PROJECT_BINARY_DIR}) + message(WARNING "lua does not support prefix when using the makefile") + endif() + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lua + COMMAND "make" + DEPENDS ${SOURCE} + ) + + +else() + message("generator [${CMAKE_GENERATOR}] does not match Unix Makefiles so manually compiling lua") + + add_library(lua ${SOURCE}) + +endif() |