From 6f62da2d692f153959e43c760b8187de46d68fe1 Mon Sep 17 00:00:00 2001 From: Lukasz Laszko Date: Tue, 28 Jan 2020 12:51:57 +0800 Subject: [PATCH] example app installation added --- CMakeLists.txt | 3 +++ conanfile.py | 1 + 2 files changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 80a77ec..20ea426 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -129,6 +129,9 @@ if (BUILD_EXAMPLES) add_executable(readme-json-schema app/readme.cpp) target_link_libraries(readme-json-schema nlohmann_json_schema_validator) + + install(TARGETS json-schema-validate readme-json-schema + DESTINATION bin) endif() if (BUILD_TESTS) diff --git a/conanfile.py b/conanfile.py index 49f78bf..bd56cbf 100644 --- a/conanfile.py +++ b/conanfile.py @@ -46,6 +46,7 @@ class JsonSchemaValidatorConan(ConanFile): def build(self): cmake = CMake(self) cmake.definitions['nlohmann_json_DIR'] = os.path.join(self.deps_cpp_info['nlohmann_json'].rootpath, 'include') + cmake.definitions['BUILD_EXAMPLES'] = True cmake.definitions['BUILD_TESTS'] = False cmake.configure() cmake.build()