summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt40
1 files changed, 40 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 000000000..77ee23cc8
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,40 @@
+
+cmake_minimum_required (VERSION 2.6)
+project (MCServer)
+
+set(CMAKE_CXX_FLAGS_BAK ${CMAKE_CXX_FLAGS})
+set(CMAKE_C_FLAGS_BAK ${CMAKE_C_FLAGS})
+if (UNIX)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
+else()
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /w")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /w")
+endif()
+set(CMAKE_BUILD_TYPE_BAK ${CMAKE_BUILD_TYPE})
+set(CMAKE_BUILD_TYPE "Release")
+
+add_subdirectory(lib/inifile/)
+add_subdirectory(lib/jsoncpp/)
+add_subdirectory(lib/cryptopp/)
+add_subdirectory(lib/zlib/)
+add_subdirectory(lib/lua/)
+add_subdirectory(lib/tolua++/)
+add_subdirectory(lib/sqlite/)
+add_subdirectory(lib/expat/)
+add_subdirectory(lib/luaexpat/)
+add_subdirectory(lib/md5/)
+
+#TODo: set -Wall -Werror -Wextra
+if(UNIX)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_BAK} -Wall -Wextra")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS_BAK} -Wall -Wextra")
+else()
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_BAK} /Wall")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS_BAK} /Wall")
+endif()
+set(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE_BAK}")
+set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -rdynamic")
+
+add_subdirectory (src)
+