summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore18
-rw-r--r--CMakeLists.txt20
-rw-r--r--lib/cryptopp/CMakeLists.txt14
-rw-r--r--lib/inifile/CMakeLists.txt7
-rw-r--r--lib/jsoncpp/CMakeLists.txt13
-rw-r--r--src/Bindings/CMakeLists.txt16
-rw-r--r--src/Blocks/CMakeLists.txt7
-rw-r--r--src/CMakeLists.txt36
-rw-r--r--src/Entities/CMakeLists.txt11
-rw-r--r--src/Generating/CMakeLists.txt11
-rw-r--r--src/HTTPServer/CMakeLists.txt7
-rw-r--r--src/Items/CMakeLists.txt7
-rw-r--r--src/Mobs/CMakeLists.txt11
-rw-r--r--src/OSSupport/CMakeLists.txt10
-rw-r--r--src/Protocol/CMakeLists.txt7
-rw-r--r--src/Simulator/CMakeLists.txt11
-rw-r--r--src/WorldStorage/CMakeLists.txt11
17 files changed, 216 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index b0ad11d53..26fe1eaac 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,7 +7,7 @@ Symbols
cloc-ignored.txt
cloc.xml
cloc.xsl
-*.ncb
+ *.ncb
*.user
*.suo
/EveryNight.cmd
@@ -15,6 +15,7 @@ cloc.xsl
# emacs stuff
*.*~
+*~
# world inside source
ChunkWorx.ini
@@ -32,3 +33,18 @@ logs
players
world
world_nether
+
+#cmake stuff
+CMakeFiles/
+cmake_install.cmake
+CMakeCache.txt
+Makefile
+
+*.a
+*.d
+CMakeCache.txt
+CMakeFiles
+Makefile
+cmake_install.cmake
+install_mainfest.txt
+src/MCServer
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 000000000..1dca91a85
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,20 @@
+
+cmake_minimum_required (VERSION 2.6)
+project (MCServer)
+
+set(CMAKE_CXX_FLAGS_BAK ${CMAKE_CXX_FLAGS})
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w")
+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/)
+
+#TODo: set -Wall -Werror -Wextra
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_BAK}")
+set(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE_BAK}")
+
+add_subdirectory (src)
+
diff --git a/lib/cryptopp/CMakeLists.txt b/lib/cryptopp/CMakeLists.txt
new file mode 100644
index 000000000..3497b3346
--- /dev/null
+++ b/lib/cryptopp/CMakeLists.txt
@@ -0,0 +1,14 @@
+
+cmake_minimum_required (VERSION 2.6)
+project (cryptopp)
+
+if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DCRYPTOPP_DISABLE_ASM")
+endif()
+include_directories ("${PROJECT_SOURCE_DIR}/../../src/")
+
+file(GLOB cryptopp_SRC
+ "*.cpp"
+)
+
+add_library(cryptopp ${cryptopp_SRC})
diff --git a/lib/inifile/CMakeLists.txt b/lib/inifile/CMakeLists.txt
new file mode 100644
index 000000000..efbd09796
--- /dev/null
+++ b/lib/inifile/CMakeLists.txt
@@ -0,0 +1,7 @@
+
+cmake_minimum_required (VERSION 2.6)
+project (iniFile)
+
+include_directories ("${PROJECT_SOURCE_DIR}/../../src/")
+
+add_library(iniFile iniFile)
diff --git a/lib/jsoncpp/CMakeLists.txt b/lib/jsoncpp/CMakeLists.txt
new file mode 100644
index 000000000..6c678f6a6
--- /dev/null
+++ b/lib/jsoncpp/CMakeLists.txt
@@ -0,0 +1,13 @@
+
+cmake_minimum_required (VERSION 2.6)
+project (jsoncpp)
+
+include_directories ("${PROJECT_SOURCE_DIR}/../../src/")
+
+file(GLOB SOURCE
+ "src/lib_json/*.h"
+ "src/lib_json/*.cpp"
+)
+
+
+add_library(jsoncpp ${SOURCE})
diff --git a/src/Bindings/CMakeLists.txt b/src/Bindings/CMakeLists.txt
new file mode 100644
index 000000000..cee61c13c
--- /dev/null
+++ b/src/Bindings/CMakeLists.txt
@@ -0,0 +1,16 @@
+
+cmake_minimum_required (VERSION 2.6)
+project (MCServer)
+
+include_directories ("${PROJECT_SOURCE_DIR}/../")
+
+ ADD_CUSTOM_COMMAND(
+#add any new generated bindings here
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Bindings.cpp ${CMAKE_CURRENT_BINARY_DIR}/Bindings.h
+#command execuded to regerate bindings
+ COMMAND "./tolua++.exe" -L virtual_method_hooks.lua -o Bindings.cpp -H Bindings.h AllToLua.pkg
+#add any new generation dependencies here
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/virtual_method_hooks.lua ${CMAKE_CURRENT_SOURCE_DIR}/AllToLua.pkg
+ )
+
+add_library(Bindings PluginManager LuaState WebPlugin)
diff --git a/src/Blocks/CMakeLists.txt b/src/Blocks/CMakeLists.txt
new file mode 100644
index 000000000..6fededb65
--- /dev/null
+++ b/src/Blocks/CMakeLists.txt
@@ -0,0 +1,7 @@
+
+cmake_minimum_required (VERSION 2.6)
+project (MCServer)
+
+include_directories ("${PROJECT_SOURCE_DIR}/../")
+
+add_library(Blocks BlockHandler)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644
index 000000000..b2376731e
--- /dev/null
+++ b/src/CMakeLists.txt
@@ -0,0 +1,36 @@
+
+cmake_minimum_required (VERSION 2.6)
+project (MCServer)
+
+if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++03")
+endif()
+
+include_directories (SYSTEM "${PROJECT_SOURCE_DIR}/../lib/")
+include_directories (SYSTEM "${PROJECT_SOURCE_DIR}/../lib/jsoncpp/include")
+
+add_subdirectory(OSSupport)
+add_subdirectory(HTTPServer)
+add_subdirectory(Bindings)
+add_subdirectory(Items)
+add_subdirectory(Blocks)
+add_subdirectory(Protocol)
+add_subdirectory(Generating)
+add_subdirectory(WorldStorage)
+add_subdirectory(Mobs)
+add_subdirectory(Entities)
+add_subdirectory(Simulator)
+add_subdirectory(UI)
+
+
+file(GLOB SOURCE
+ "*.cpp"
+)
+
+list(REMOVE_ITEM SOURCE "${PROJECT_SOURCE_DIR}/StackWalker.cpp" "${PROJECT_SOURCE_DIR}/LeakFinder.cpp")
+
+add_executable(../MCServer/MCServer ${SOURCE})
+
+target_link_libraries(../MCServer/MCServer OSSupport HTTPServer iniFile Bindings Items Blocks)
+target_link_libraries(../MCServer/MCServer Protocol Generating WorldStorage jsoncpp cryptopp)
+target_link_libraries(../MCServer/MCServer Mobs Entities Simulator UI zlib)
diff --git a/src/Entities/CMakeLists.txt b/src/Entities/CMakeLists.txt
new file mode 100644
index 000000000..85cc45494
--- /dev/null
+++ b/src/Entities/CMakeLists.txt
@@ -0,0 +1,11 @@
+
+cmake_minimum_required (VERSION 2.6)
+project (MCServer)
+
+include_directories ("${PROJECT_SOURCE_DIR}/../")
+
+file(GLOB SOURCE
+ "*.cpp"
+)
+
+add_library(Entities ${SOURCE})
diff --git a/src/Generating/CMakeLists.txt b/src/Generating/CMakeLists.txt
new file mode 100644
index 000000000..e1ba299fc
--- /dev/null
+++ b/src/Generating/CMakeLists.txt
@@ -0,0 +1,11 @@
+
+cmake_minimum_required (VERSION 2.6)
+project (MCServer)
+
+include_directories ("${PROJECT_SOURCE_DIR}/../")
+
+file(GLOB SOURCE
+ "*.cpp"
+)
+
+add_library(Generating ${SOURCE})
diff --git a/src/HTTPServer/CMakeLists.txt b/src/HTTPServer/CMakeLists.txt
new file mode 100644
index 000000000..b94aa5306
--- /dev/null
+++ b/src/HTTPServer/CMakeLists.txt
@@ -0,0 +1,7 @@
+
+cmake_minimum_required (VERSION 2.6)
+project (MCServer)
+
+include_directories ("${PROJECT_SOURCE_DIR}/../")
+
+add_library(HTTPServer HTTPServer HTTPConnection HTTPFormParser HTTPMessage MultipartParser)
diff --git a/src/Items/CMakeLists.txt b/src/Items/CMakeLists.txt
new file mode 100644
index 000000000..44a9f594f
--- /dev/null
+++ b/src/Items/CMakeLists.txt
@@ -0,0 +1,7 @@
+
+cmake_minimum_required (VERSION 2.6)
+project (MCServer)
+
+include_directories ("${PROJECT_SOURCE_DIR}/../")
+
+add_library(Items ItemHandler)
diff --git a/src/Mobs/CMakeLists.txt b/src/Mobs/CMakeLists.txt
new file mode 100644
index 000000000..87fbfd2fc
--- /dev/null
+++ b/src/Mobs/CMakeLists.txt
@@ -0,0 +1,11 @@
+
+cmake_minimum_required (VERSION 2.6)
+project (MCServer)
+
+include_directories ("${PROJECT_SOURCE_DIR}/../")
+
+file(GLOB SOURCE
+ "*.cpp"
+)
+
+add_library(Mobs ${SOURCE})
diff --git a/src/OSSupport/CMakeLists.txt b/src/OSSupport/CMakeLists.txt
new file mode 100644
index 000000000..8eeff9d9b
--- /dev/null
+++ b/src/OSSupport/CMakeLists.txt
@@ -0,0 +1,10 @@
+
+cmake_minimum_required (VERSION 2.6)
+project (MCServer)
+
+include_directories ("${PROJECT_SOURCE_DIR}/../")
+file(GLOB SOURCE
+ "*.cpp"
+)
+
+add_library(OSSupport ${SOURCE})
diff --git a/src/Protocol/CMakeLists.txt b/src/Protocol/CMakeLists.txt
new file mode 100644
index 000000000..53dc295c0
--- /dev/null
+++ b/src/Protocol/CMakeLists.txt
@@ -0,0 +1,7 @@
+
+cmake_minimum_required (VERSION 2.6)
+project (MCServer)
+
+include_directories ("${PROJECT_SOURCE_DIR}/../")
+
+add_library(Protocol ProtocolRecognizer)
diff --git a/src/Simulator/CMakeLists.txt b/src/Simulator/CMakeLists.txt
new file mode 100644
index 000000000..4f3f1ad0e
--- /dev/null
+++ b/src/Simulator/CMakeLists.txt
@@ -0,0 +1,11 @@
+
+cmake_minimum_required (VERSION 2.6)
+project (MCServer)
+
+include_directories ("${PROJECT_SOURCE_DIR}/../")
+
+file(GLOB SOURCE
+ "*.cpp"
+)
+
+add_library(Simulator ${SOURCE})
diff --git a/src/WorldStorage/CMakeLists.txt b/src/WorldStorage/CMakeLists.txt
new file mode 100644
index 000000000..d431bdf6a
--- /dev/null
+++ b/src/WorldStorage/CMakeLists.txt
@@ -0,0 +1,11 @@
+
+cmake_minimum_required (VERSION 2.6)
+project (MCServer)
+
+include_directories ("${PROJECT_SOURCE_DIR}/../")
+
+file(GLOB SOURCE
+ "*.cpp"
+)
+
+add_library(WorldStorage ${SOURCE})