json-schema-validator/json-schema-validatorConfig.cmake.in
Luke Kersting d523cbd0ac Added Config file and updated install scripts.
Now when json-schema-validator is installed CMake config files are installed in the lib/cmake/json-schema-validator directory.
The install json-schema-validatorTargets.cmake file properly imports the json-hpp and json-schema-validator libraries.
The install json-schema-validatorConfig.cmake file is used by CMake find_package function to include the json-schema-validatorTargets.cmake file and to set the variable JSON_SCHEMA_VALIDATOR_INCLUDE_DIRS to the install include directory.
To use find_package to find the json-schema-validator simply include.
A new test (test_cmake_install) has been added.
2019-10-18 10:05:27 -06:00

14 lines
620 B
CMake

# Config file for the json-schema-validator
# It defines the following variables
# JSON_SCHEMA_VALIDATOR_INCLUDE_DIRS - include directories for json-schema-validator
# json-schema-validator - json-schema-validator library to link against
# Compute paths
get_filename_component(JSON_SCHEMA_VALIDATOR_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
set(JSON_SCHEMA_VALIDATOR_INCLUDE_DIRS @CONF_INCLUDE_DIRS@)
# Our library dependencies (contains definitions for IMPORTED targets)
if(NOT TARGET json-schema-validator)
include("${JSON_SCHEMA_VALIDATOR_CMAKE_DIR}/json-schema-validatorTargets.cmake")
endif()