1 diff --git a/CMakeLists.txt b/CMakeLists.txt
2 index c4cc218..ff2b706 100644
5 @@ -8,6 +8,8 @@ cmake_minimum_required(VERSION 3.2)
6 option(BUILD_TESTS "Build tests" ON)
7 option(BUILD_EXAMPLES "Build examples" ON)
9 +find_package(nlohmann_json CONFIG REQUIRED)
12 add_library(nlohmann_json_schema_validator
13 src/json-schema-draft7.json.cpp
14 @@ -34,6 +36,13 @@ set_target_properties(nlohmann_json_schema_validator
15 # because of the dependency to nlohmann_json.
16 set(JSON_VALIDATOR_INSTALL ON)
18 +target_link_libraries(
19 + nlohmann_json_schema_validator
22 + nlohmann_json::nlohmann_json)
25 # here we decice how nlohmann::json is found and used to build this project
27 # first, check whether a nlohmann_json::nlohmann_json target exists already
28 @@ -92,7 +101,7 @@ else()
29 set(nlohmann_json_DIR ${JSON_HPP})
34 if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR
35 "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
36 target_compile_options(nlohmann_json_schema_validator