diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | CMakeLists.txt | 5 | ||||
-rw-r--r-- | lib/cryptopp/CMakeLists.txt | 7 | ||||
-rw-r--r-- | lib/jsoncpp/CMakeLists.txt | 8 | ||||
-rw-r--r-- | src/Bindings/CMakeLists.txt | 7 | ||||
-rw-r--r-- | src/CMakeLists.txt | 8 | ||||
-rw-r--r-- | src/OSSupport/CMakeLists.txt | 6 |
7 files changed, 33 insertions, 9 deletions
diff --git a/.gitignore b/.gitignore index 383b55f07..26fe1eaac 100644 --- a/.gitignore +++ b/.gitignore @@ -47,3 +47,4 @@ CMakeFiles Makefile cmake_install.cmake install_mainfest.txt +src/MCServer diff --git a/CMakeLists.txt b/CMakeLists.txt index f4a8c5ab0..75eb77fcf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,13 +4,16 @@ 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/) #TODo: set -Wall -Werror -Wextra -set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_BAK}" ) +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 index daa16ca53..e0e65c818 100644 --- a/lib/cryptopp/CMakeLists.txt +++ b/lib/cryptopp/CMakeLists.txt @@ -7,4 +7,9 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") endif() include_directories ("${PROJECT_SOURCE_DIR}/../../src/") -add_library(cryptopp rsa integer queue secblock misc randpool pch asn oids modarith nbtheory sha algparam fips140 pssr aes hrtimer cryptlib filters pubkey algebra simple pkcspad iterhash emsa2 eprecomp cpu rijndael) +file(GLOB cryptopp_SRC + "*.h" + "*.cpp" +) + +add_library(cryptopp ${cryptopp_SRC}) diff --git a/lib/jsoncpp/CMakeLists.txt b/lib/jsoncpp/CMakeLists.txt index dd4128ade..6c678f6a6 100644 --- a/lib/jsoncpp/CMakeLists.txt +++ b/lib/jsoncpp/CMakeLists.txt @@ -4,4 +4,10 @@ project (jsoncpp) include_directories ("${PROJECT_SOURCE_DIR}/../../src/") -add_library(jsoncpp src/lib_json/json_value.cpp) +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 index 42a6f205f..f2c2fa3ab 100644 --- a/src/Bindings/CMakeLists.txt +++ b/src/Bindings/CMakeLists.txt @@ -4,4 +4,11 @@ project (MCServer) include_directories ("${PROJECT_SOURCE_DIR}/../") + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/foo.c + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/bar.c ${CMAKE_CURRENT_BINARY_DIR}/foo.c + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bar.c + ) +execute_process(COMMAND "./tolua++.exe" -L virtual_method_hooks.lua -o Bindings.cpp -H Bindings.h AllToLua.pkg) + add_library(Bindings PluginManager LuaState WebPlugin) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6cc97d971..a5b1fab63 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -21,10 +21,10 @@ add_subdirectory(Mobs) add_subdirectory(Entities) add_subdirectory(Simulator) -set(SOURCE main Root MCLogger Authenticator StringUtils Server DeadlockDetect WebAdmin GroupManager) -set(SOURCE ${SOURCE} CraftingRecipes FurnaceRecipe MonsterConfig World CommandOutput RCONServer) -set(SOURCE ${SOURCE} Log ClientHandle ChatColor Group Enchantments MonsterConfig ChunkMap ChunkSender) -set(SOURCE ${SOURCE} LightingThread MobCensus MobSpawner MobProximityCounter Noise) +file(GLOB SOURCE + "*.h" + "*.cpp" +) add_executable(../MCServer/MCServer ${SOURCE}) diff --git a/src/OSSupport/CMakeLists.txt b/src/OSSupport/CMakeLists.txt index dbf5dcc7a..e559ca681 100644 --- a/src/OSSupport/CMakeLists.txt +++ b/src/OSSupport/CMakeLists.txt @@ -3,7 +3,9 @@ cmake_minimum_required (VERSION 2.6) project (MCServer) include_directories ("${PROJECT_SOURCE_DIR}/../") -set(SOURCE CriticalSection Timer Thread Sleep IsThread Event SocketThreads ListenThread) -set(SOURCE ${SOURCE} BlockingTCPLink Socket File) +file(GLOB SOURCE + "*.h" + "*.cpp" +) add_library(OSSupport ${SOURCE}) |