From ab346593cab00bc000cb34819f3784580d21e6d7 Mon Sep 17 00:00:00 2001 From: ljfa-ag Date: Mon, 14 Sep 2015 21:03:37 +0200 Subject: Add zlib dependency Todo: make it optional --- CMakeLists.txt | 3 ++- test/CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9a2eb71cb8..cd073e0e56 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,8 @@ add_library(nbt++ STATIC src/text/json_formatter.cpp) -find_package(CxxTest) +find_package(zlib REQUIRED) +find_package(CxxTest) option(NBT_BUILD_TESTS "Build the unit tests. Requires CxxTest." ${CXXTEST_FOUND}) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 2c6c09ef61..c640ef054e 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -18,7 +18,7 @@ CXXTEST_ADD_TEST(write_test write_test.cpp ${CMAKE_CURRENT_SOURCE_DIR}/write_tes target_link_libraries(write_test nbt++) CXXTEST_ADD_TEST(zlibstream_test zlibstream_test.cpp ${CMAKE_CURRENT_SOURCE_DIR}/zlibstream_test.h) -target_link_libraries(zlibstream_test nbt++) +target_link_libraries(zlibstream_test nbt++ z) add_executable(format_test format_test.cpp) target_link_libraries(format_test nbt++) -- cgit 0.0.5-2-1-g0f52