1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a6cf361..c1a5d87 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -65,39 +65,13 @@ endif()
find_package(Poco OPTIONAL_COMPONENTS JSON)
find_package(Qt5Core)
-# jsoncpp library
-add_library(jsoncpp
- thirdparty/jsoncpp/src/lib_json/json_reader.cpp
- thirdparty/jsoncpp/src/lib_json/json_value.cpp
- thirdparty/jsoncpp/src/lib_json/json_writer.cpp
-)
-
-target_include_directories(jsoncpp SYSTEM PRIVATE thirdparty/jsoncpp/include)
-set_target_properties(jsoncpp PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/thirdparty/jsoncpp)
-
-add_library(json11
- thirdparty/json11/json11.cpp
-)
-
-target_include_directories(json11 SYSTEM PRIVATE thirdparty/json11)
-set_target_properties(json11 PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/thirdparty/json11)
-
-# yaml-cpp library
-file(GLOB yamlcpp_SOURCES "thirdparty/yaml-cpp/src/*.cpp")
-add_library(yamlcpp ${yamlcpp_SOURCES})
-
-target_include_directories(yamlcpp SYSTEM PRIVATE thirdparty/yamlcpp/include)
-set_target_properties(yamlcpp PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/thirdparty/yamlcpp)
-
# Not all of these are required for examples build it doesn't hurt to include them
include_directories(include SYSTEM
- thirdparty/googletest/include
- thirdparty/json11
- thirdparty/jsoncpp/include
- thirdparty/rapidjson/include
- thirdparty/picojson
- thirdparty/nlohmann-json/include
- thirdparty/yaml-cpp/include
+ /usr/src/googletest/googletest/include/gtest
+ /usr/include/jsoncpp/
+ /usr/include/rapidjson/
+ /usr/include/nlohmann/
+ /usr/include/yaml-cpp/
)
if(valijson_BUILD_TESTS)
@@ -109,14 +83,12 @@ if(valijson_BUILD_TESTS)
set(gtest_force_shared_crt ON)
option(BUILD_GMOCK FALSE)
option(INSTALL_GTEST FALSE)
- add_subdirectory(thirdparty/googletest)
set(TEST_SOURCES
tests/test_adapter_comparison.cpp
tests/test_fetch_absolute_uri_document_callback.cpp
tests/test_fetch_urn_document_callback.cpp
tests/test_json_pointer.cpp
- tests/test_json11_adapter.cpp
tests/test_jsoncpp_adapter.cpp
tests/test_nlohmann_json_adapter.cpp
tests/test_rapidjson_adapter.cpp
@@ -127,7 +100,7 @@ if(valijson_BUILD_TESTS)
tests/test_yaml_cpp_adapter.cpp
)
- set(TEST_LIBS gtest gtest_main jsoncpp json11 yamlcpp)
+ set(TEST_LIBS gtest gtest_main jsoncpp yaml-cpp)
if(Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
@@ -178,6 +151,7 @@ if(valijson_BUILD_TESTS)
if(NOT MSVC)
set_target_properties(test_suite PROPERTIES COMPILE_FLAGS " -pedantic -Werror -Wshadow -Wunused")
+ set_target_properties(test_suite PROPERTIES LINK_FLAGS " -pthread")
endif()
if (MSVC)
diff --git a/tests/test_validator.cpp b/tests/test_validator.cpp
index e2bf78e..37e6ee4 100644
--- a/tests/test_validator.cpp
+++ b/tests/test_validator.cpp
@@ -32,9 +32,9 @@
#include <valijson/utils/poco_json_utils.hpp>
#endif
-#define REMOTES_DIR "../thirdparty/JSON-Schema-Test-Suite/remotes/"
+#define REMOTES_DIR "/usr/share/json-schema-test-suite/remotes/"
-#define TEST_SUITE_DIR "../thirdparty/JSON-Schema-Test-Suite/tests/"
+#define TEST_SUITE_DIR "/usr/share/json-schema-test-suite/tests/"
using valijson::adapters::AdapterTraits;
using valijson::adapters::RapidJsonAdapter;
|