summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2015-07-10 00:43:23 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2015-07-12 13:23:11 +0200
commite69d4536abba0df83a5aef68b5290dc61501ac42 (patch)
tree2c8298821a70e0edf19deeae34e58b46240e6952
parentUpdated and submodularised JsonCPP (diff)
downloadcuberite-e69d4536abba0df83a5aef68b5290dc61501ac42.tar
cuberite-e69d4536abba0df83a5aef68b5290dc61501ac42.tar.gz
cuberite-e69d4536abba0df83a5aef68b5290dc61501ac42.tar.bz2
cuberite-e69d4536abba0df83a5aef68b5290dc61501ac42.tar.lz
cuberite-e69d4536abba0df83a5aef68b5290dc61501ac42.tar.xz
cuberite-e69d4536abba0df83a5aef68b5290dc61501ac42.tar.zst
cuberite-e69d4536abba0df83a5aef68b5290dc61501ac42.zip
Diffstat (limited to '')
-rw-r--r--.gitmodules7
-rw-r--r--CMakeLists.txt7
-rw-r--r--src/CMakeLists.txt3
3 files changed, 13 insertions, 4 deletions
diff --git a/.gitmodules b/.gitmodules
index 9f24ad352..f3653ec9f 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -22,16 +22,21 @@
[submodule "lib/polarssl"]
path = lib/polarssl
url = https://github.com/mc-server/polarssl.git
+ ignore = dirty
[submodule "lib/SQLiteCpp"]
path = lib/SQLiteCpp
url = https://github.com/mc-server/SQLiteCpp.git
+ ignore = dirty
[submodule "lib/libevent"]
path = lib/libevent
url = https://github.com/mc-server/libevent.git
+ ignore = dirty
[submodule "lib/jsoncpp"]
path = lib/jsoncpp
url = https://github.com/open-source-parsers/jsoncpp.git
+ ignore = dirty
[submodule "lib/TCLAP"]
path = lib/TCLAP
url = https://github.com/mc-server/TCLAP.git
- \ No newline at end of file
+ ignore = dirty
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6c625006d..a02c9b4fd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -148,9 +148,11 @@ set(EVENT__DISABLE_REGRESS YES CACHE BOOL "Disable LibEvent regression tests"
set(EVENT__DISABLE_SAMPLES YES CACHE BOOL "Disable LibEvent samples" FORCE)
# Set options for JsonCPP, disabling all of their tests
+# Additionally, their library is output to a strange location; make sure the linker knows where to find it
set(JSONCPP_WITH_TESTS OFF CACHE BOOL "Compile and (for jsoncpp_check) run JsonCpp test executables")
set(JSONCPP_WITH_POST_BUILD_UNITTEST OFF CACHE BOOL "Automatically run unit-tests as a post build step")
set(JSONCPP_WITH_PKGCONFIG_SUPPORT OFF CACHE BOOL "Generate and install .pc files")
+link_directories(lib/jsoncpp/src/lib_json)
# Check that the libraries are present:
if (NOT EXISTS ${CMAKE_SOURCE_DIR}/lib/SQLiteCpp/CMakeLists.txt)
@@ -183,6 +185,9 @@ set_property(TARGET SQLiteCpp PROPERTY INCLUDE_DIRECTORIES "${SQLITECPP_INCLUDES
# Add proper includes for LibEvent's event-config.h header:
include_directories(SYSTEM ${LIBEVENT_INCLUDE_DIRS})
+# Prettify jsoncpp_lib_static name in VS solution explorer
+set_property(TARGET jsoncpp_lib_static PROPERTY PROJECT_LABEL "jsoncpp")
+
if (WIN32)
add_subdirectory(lib/luaproxy/)
endif()
@@ -208,7 +213,7 @@ if (MSVC)
event_core
event_extra
expat
- jsoncpp
+ jsoncpp_lib_static
lua
luaexpat
mbedtls
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d8a72a360..6c8fe7d0c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -376,5 +376,4 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
add_flags_lnk(-L/usr/local/lib)
endif()
-find_library(JSONCPP_LIBRARY jsoncpp ../lib/jsoncpp/src/lib_json)
-target_link_libraries(${EXECUTABLE} luaexpat ${JSONCPP_LIBRARY} mbedtls zlib sqlite lua SQLiteCpp event_core event_extra)
+target_link_libraries(${EXECUTABLE} luaexpat jsoncpp_lib_static mbedtls zlib sqlite lua SQLiteCpp event_core event_extra)