From 036a8ff98e890071089e9938cb87c5c4323152f0 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Mon, 28 Jul 2014 19:59:53 +0200 Subject: Added SQLiteCpp library. This provides C++ wrappers for SQLite, making it safer to use in the C++ environment. --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index a6400c1b4..478b79047 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,6 +53,14 @@ endif() project (MCServer) +# Set options for SQLiteCpp, disable all their tests and lints: +set(SQLITECPP_RUN_CPPLINT OFF CACHE BOOL "Run cpplint.py tool for Google C++ StyleGuide." FORCE) +set(SQLITECPP_RUN_CPPCHECK OFF CACHE BOOL "Run cppcheck C++ static analysis tool." FORCE) +set(SQLITECPP_RUN_DOXYGEN OFF CACHE BOOL "Run Doxygen C++ documentation tool." FORCE) +set(SQLITECPP_BUILD_EXAMPLES OFF CACHE BOOL "Build examples." FORCE) +set(SQLITECPP_BUILD_TESTS OFF CACHE BOOL "Build and run tests." FORCE) +set(SQLITECPP_INTERNAL_SQLITE OFF CACHE BOOL "Add the internal SQLite3 source to the project." FORCE) + # Include all the libraries: add_subdirectory(lib/inifile/) add_subdirectory(lib/jsoncpp/) @@ -60,6 +68,7 @@ add_subdirectory(lib/zlib/) add_subdirectory(lib/lua/) add_subdirectory(lib/tolua++/) add_subdirectory(lib/sqlite/) +add_subdirectory(lib/SQLiteCpp/) add_subdirectory(lib/expat/) add_subdirectory(lib/luaexpat/) -- cgit v1.2.3 From 5fb5f6671f2b138dc56187183f0650b70a4d2eb4 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Mon, 28 Jul 2014 20:16:24 +0200 Subject: Fixed include directories for SQLiteCpp. --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 478b79047..2b30e1e0b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,6 +72,12 @@ add_subdirectory(lib/SQLiteCpp/) add_subdirectory(lib/expat/) add_subdirectory(lib/luaexpat/) +# Add proper include directories so that SQLiteCpp can find SQLite3: +get_property(SQLITECPP_INCLUDES DIRECTORY "lib/SQLiteCpp/" PROPERTY INCLUDE_DIRECTORIES) +set(SQLITECPP_INCLUDES "${SQLITECPP_INCLUDES}" "${CMAKE_CURRENT_SOURCE_DIR}/lib/sqlite/") +message("SQLiteCpp includes: " "${SQLITECPP_INCLUDES}") +set_property(DIRECTORY lib/SQLiteCpp/ PROPERTY INCLUDE_DIRECTORIES "${SQLITECPP_INCLUDES}") + if (WIN32) add_subdirectory(lib/luaproxy/) endif() -- cgit v1.2.3 From 7f7604a186885107d0bd9625d969aef45a60dcce Mon Sep 17 00:00:00 2001 From: Mattes D Date: Mon, 28 Jul 2014 22:06:47 +0200 Subject: Fixed SQLiteCpp include paths for MSVC2010+. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 2b30e1e0b..dd9b1e67c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,8 +75,8 @@ add_subdirectory(lib/luaexpat/) # Add proper include directories so that SQLiteCpp can find SQLite3: get_property(SQLITECPP_INCLUDES DIRECTORY "lib/SQLiteCpp/" PROPERTY INCLUDE_DIRECTORIES) set(SQLITECPP_INCLUDES "${SQLITECPP_INCLUDES}" "${CMAKE_CURRENT_SOURCE_DIR}/lib/sqlite/") -message("SQLiteCpp includes: " "${SQLITECPP_INCLUDES}") set_property(DIRECTORY lib/SQLiteCpp/ PROPERTY INCLUDE_DIRECTORIES "${SQLITECPP_INCLUDES}") +set_property(TARGET SQLiteCpp PROPERTY INCLUDE_DIRECTORIES "${SQLITECPP_INCLUDES}") if (WIN32) add_subdirectory(lib/luaproxy/) -- cgit v1.2.3 From 5fa206a4208b64b4a536bf7e2ab49affc56500d4 Mon Sep 17 00:00:00 2001 From: Tycho Date: Sat, 6 Sep 2014 15:30:13 +0100 Subject: bumped cmake version min and fixed clang support --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index dd9b1e67c..a00ed84c6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.2) +cmake_minimum_required (VERSION 2.8.10) # Without this, the MSVC variable isn't defined for MSVC builds ( http://www.cmake.org/pipermail/cmake/2011-November/047130.html ) enable_language(CXX C) -- cgit v1.2.3 From 562b2d1d1de7438bc763d778b56b0743affd1b5b Mon Sep 17 00:00:00 2001 From: Tycho Date: Sat, 6 Sep 2014 16:30:04 +0100 Subject: Added workaround for clang version --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index a00ed84c6..4c47eb509 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.7) # Without this, the MSVC variable isn't defined for MSVC builds ( http://www.cmake.org/pipermail/cmake/2011-November/047130.html ) enable_language(CXX C) -- cgit v1.2.3 From 27be1799392e89b2b67121ea6febd51c2b9ec4fb Mon Sep 17 00:00:00 2001 From: Tycho Date: Wed, 10 Sep 2014 16:07:00 +0100 Subject: Added abilty to set build info build info is displayed at startup Fixes #1410 --- CMakeLists.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c47eb509..8f58f157a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,6 +18,25 @@ if(DEFINED ENV{TRAVIS_BUILD_WITH_COVERAGE}) set(BUILD_WITH_COVERAGE $ENV{TRAVIS_BUILD_WITH_COVERAGE}) endif() +if(DEFINED ENV{BUILD_ID}) + set(BUILD_ID $ENV{BUILD_ID}) + set(BUILD_SERIES_NAME $ENV{BUILD_SERIES_NAME}) + set(BUILD_DATETIME $ENV{BUILD_DATETIME}) + if(DEFINED ENV{BUILD_COMMIT_ID}) + set(BUILD_COMMIT_ID $ENV{BUILD_COMMIT_ID}) + else() + message("Commit id not set, attempting to determine id from git") + execute_process( + COMMAND git rev-parse HEAD + RESULT_VARIABLE GIT_EXECUTED + OUTPUT_VARIABLE BUILD_COMMIT_ID) + string(STRIP ${BUILD_COMMIT_ID} BUILD_COMMIT_ID) + if (NOT (GIT_EXECUTED EQUAL 0)) + message(FATAL_ERROR "Could not identifiy git commit id") + endif() + endif() +endif() + # This has to be done before any flags have been set up. if(${BUILD_TOOLS}) add_subdirectory(Tools/MCADefrag/) -- cgit v1.2.3 From 4f67ca4c0ac2f3ea4090882d982670b94913c6b2 Mon Sep 17 00:00:00 2001 From: Tycho Date: Wed, 10 Sep 2014 18:08:50 +0100 Subject: Added MCServer_ prfix to env vars for versions --- CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f58f157a..188cf81e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,12 +18,12 @@ if(DEFINED ENV{TRAVIS_BUILD_WITH_COVERAGE}) set(BUILD_WITH_COVERAGE $ENV{TRAVIS_BUILD_WITH_COVERAGE}) endif() -if(DEFINED ENV{BUILD_ID}) - set(BUILD_ID $ENV{BUILD_ID}) - set(BUILD_SERIES_NAME $ENV{BUILD_SERIES_NAME}) - set(BUILD_DATETIME $ENV{BUILD_DATETIME}) - if(DEFINED ENV{BUILD_COMMIT_ID}) - set(BUILD_COMMIT_ID $ENV{BUILD_COMMIT_ID}) +if(DEFINED ENV{MCSERVER_BUILD_ID}) + set(BUILD_ID $ENV{MCSERVER_BUILD_ID}) + set(BUILD_SERIES_NAME $ENV{MCSERVER_BUILD_SERIES_NAME}) + set(BUILD_DATETIME $ENV{MCSERVER_BUILD_DATETIME}) + if(DEFINED ENV{MCSERVER_BUILD_COMMIT_ID}) + set(BUILD_COMMIT_ID $ENV{MCSERVER_BUILD_COMMIT_ID}) else() message("Commit id not set, attempting to determine id from git") execute_process( -- cgit v1.2.3