From 990a8291bd89a4f46464a24a07fe965659f6fa52 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Thu, 5 Jun 2025 14:04:32 +0800 Subject: Only Windows link to Boost JSON library file Adding another library file to link means adding many more lines for other platform(s), at least for macOS with its bundling. It's much simpler to make the condition on 2 files. --- indra/cmake/Boost.cmake | 5 +++-- indra/llcommon/llsdjson.cpp | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake index df5f05a200..5a9e10b38b 100644 --- a/indra/cmake/Boost.cmake +++ b/indra/cmake/Boost.cmake @@ -20,13 +20,14 @@ target_link_libraries( ll::boost INTERFACE boost_context${sfx} boost_fiber${sfx} boost_filesystem${sfx} - boost_json${sfx} boost_program_options${sfx} boost_system${sfx} boost_thread${sfx} boost_url${sfx} ) -if (NOT WINDOWS) +if (WINDOWS) + target_link_libraries( ll::boost INTERFACE boost_json${sfx}) +else () target_link_libraries( ll::boost INTERFACE boost_regex${sfx}) endif () target_compile_definitions( ll::boost INTERFACE BOOST_BIND_GLOBAL_PLACEHOLDERS ) diff --git a/indra/llcommon/llsdjson.cpp b/indra/llcommon/llsdjson.cpp index a3f80b7c2e..a4b45ed80d 100644 --- a/indra/llcommon/llsdjson.cpp +++ b/indra/llcommon/llsdjson.cpp @@ -35,7 +35,11 @@ #include "llerror.h" #include "../llmath/llmath.h" +#if LL_WINDOWS #include +#else +#include +#endif //========================================================================= LLSD LlsdFromJson(const boost::json::value& val) -- cgit v1.2.3