From 54b03cf525acf42bf45246ebb3e602264380c048 Mon Sep 17 00:00:00 2001 From: Mario Haustein Date: Fri, 12 Apr 2024 11:02:47 +0200 Subject: [PATCH] Fix build with system JSON library (#914) --- indi-qhy/CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/indi-qhy/CMakeLists.txt b/indi-qhy/CMakeLists.txt index 07c907a79..a3b98b546 100644 --- a/indi-qhy/CMakeLists.txt +++ b/indi-qhy/CMakeLists.txt @@ -13,6 +13,16 @@ find_package(Nova REQUIRED) find_package(USB1 REQUIRED) find_package(Threads REQUIRED) +if(INDI_JSONLIB) + set(JSONLIB "") + message(STATUS "Using indi bundled json library") +else(INDI_JSONLIB) + find_package(nlohmann_json REQUIRED) + add_definitions(-D_USE_SYSTEM_JSONLIB) + set(JSONLIB nlohmann_json::nlohmann_json) + message(STATUS "Using system provided Niels Lohmann's json library") +endif(INDI_JSONLIB) + set(INDI_QHY_VERSION_MAJOR 2) set(INDI_QHY_VERSION_MINOR 8)