summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt3
-rw-r--r--test/CMakeLists.txt2
2 files changed, 3 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4ebd2d0c6c..ad05cb74a3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -31,10 +31,9 @@ target_link_libraries(nbt++ z)
generate_export_header(nbt++ BASE_NAME nbt)
find_package(ZLIB REQUIRED)
-find_package(CxxTest)
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
-option(NBT_BUILD_TESTS "Build the unit tests. Requires CxxTest." ${CXXTEST_FOUND})
+option(NBT_BUILD_TESTS "Build the unit tests. Requires CxxTest." ON)
if(NBT_BUILD_TESTS)
enable_testing()
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 418f6b4b14..04a461a07a 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,4 +1,6 @@
enable_testing()
+find_package(CxxTest REQUIRED)
+
include_directories(${libnbt++_SOURCE_DIR}/include)
include_directories(${CXXTEST_INCLUDE_DIR})