aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0001-Set-Json_validator-Install-off-if-it-finds-it-via-li.patch
blob: 6e6a4b93e88684c250c0a7b60ae271d1520b6808 (plain)
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
From 35939115142db6cd366ab11b29692a0179338ddf Mon Sep 17 00:00:00 2001
From: Parian Golchin <Parian.Golchin@iris-sensing.com>
Date: Fri, 18 Aug 2023 15:54:25 +0200
Subject: [PATCH 1/3] Set Json_validator Install off if it finds it via linking

Upstream-Status: Inappropriate [newer version of cmake in main branch]

Signed-off-by: Parian Golchin <Parian.Golchin@iris-sensing.com>
---
 CMakeLists.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f636734..9e4587f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -55,6 +55,9 @@ option(JSON_VALIDATOR_BUILD_EXAMPLES "Build examples" ${JSON_VALIDATOR_IS_TOP_LE
 
 if(NOT TARGET nlohmann_json::nlohmann_json)
     find_package(nlohmann_json REQUIRED)
+else()
+    message(STATUS "Found nlohmann_json::nlohmann_json-target - linking with it")
+    set(JSON_VALIDATOR_INSTALL OFF)
 endif()
 
 target_link_libraries(
-- 
2.25.1