From 153323a4c023bbacf231fdc7ba564982e9f77644 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Fri, 7 Jul 2023 23:21:43 +0200 Subject: [PATCH] Fix: [Emscripten] actually link against nlohmann_json (#11120) We fake a plain (non-scoped) library, but we don't actually set the library to anything valid. In result, it is never actually linked. --- os/emscripten/cmake/Findnlohmann_json.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/os/emscripten/cmake/Findnlohmann_json.cmake b/os/emscripten/cmake/Findnlohmann_json.cmake index 7e863a7cf8..8a1c075ad0 100644 --- a/os/emscripten/cmake/Findnlohmann_json.cmake +++ b/os/emscripten/cmake/Findnlohmann_json.cmake @@ -15,6 +15,7 @@ if (nlohmann_json_FOUND) INTERFACE_COMPILE_OPTIONS "-sUSE_NLOHMANN_JSON=1" INTERFACE_LINK_LIBRARIES "-sUSE_NLOHMANN_JSON=1" ) + set(nlohmann_json_LIBRARY "nlohmann_json") else() message(WARNING "You are using an emscripten SDK without nlohmann-json support. Please apply 'emsdk-nlohmann_json.patch' to your local emsdk installation.") endif()