From 3d4b848b9b55ca6586407a03309f1c78c519888b Mon Sep 17 00:00:00 2001 From: Mario Haustein Date: Thu, 11 Apr 2024 23:37:32 +0200 Subject: [PATCH] Fix build with system JSON library --- 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)