From d14235f7f25d1a4d70f6b1c422e6e1765e1d431b Mon Sep 17 00:00:00 2001 From: Pierre Kestener Date: Fri, 28 Apr 2023 13:30:58 +0200 Subject: [PATCH] Fix example link when jansson is needed by libsc in cmake. This was forgotten in MR #205 because examples are built in a separate sub-project. --- example/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 94c454f1c..148e88645 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -38,9 +38,14 @@ if(NOT P4EST_NONEED_M) check_symbol_exists(sqrt math.h P4EST_NEED_M) endif() +if(SC_HAVE_JSON) + include(../cmake/jansson.cmake) +endif() + target_link_libraries(SC::SC INTERFACE $<$:MPI::MPI_C> $<$:ZLIB::ZLIB> +$<$:jansson::jansson> $<$:m> ) # --- get system capabilities