Skip to content

Commit

Permalink
Merge pull request #210 from pkestene/fix/cmake_example_json_link
Browse files Browse the repository at this point in the history
Fix example link when jansson is needed by libsc in cmake.
  • Loading branch information
cburstedde authored Apr 28, 2023
2 parents e76947f + d14235f commit 81aa78e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
$<$<BOOL:${MPI_C_FOUND}>:MPI::MPI_C>
$<$<BOOL:${ZLIB_FOUND}>:ZLIB::ZLIB>
$<$<BOOL:${SC_HAVE_JSON}>:jansson::jansson>
$<$<BOOL:${P4EST_NEED_M}>:m>
)
# --- get system capabilities
Expand Down

0 comments on commit 81aa78e

Please sign in to comment.