From 0b3ef8f67946b8b3048de35b609d049aa9995b3b Mon Sep 17 00:00:00 2001
From: Korcan Hussein <korcan.hussein@collabora.com>
Date: Thu, 25 May 2023 14:39:02 +0100
Subject: [PATCH] cmake: Fix linux builds with vcpkg.

---
 cmake/FindcJSON.cmake | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cmake/FindcJSON.cmake b/cmake/FindcJSON.cmake
index aa1937a46..531115d28 100644
--- a/cmake/FindcJSON.cmake
+++ b/cmake/FindcJSON.cmake
@@ -37,6 +37,7 @@ include(FindPackageHandleStandardArgs)
 # Check for CMake config first.
 find_package(cJSON QUIET CONFIG)
 if(cJSON_FOUND AND TARGET cjson)
+    set_target_properties(cjson PROPERTIES IMPORTED_GLOBAL TRUE)
     # Found config, let's prefer it.
     find_package_handle_standard_args(cJSON CONFIG_MODE)
     set(CJSON_LIBRARY cjson)