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.
This commit is contained in:
		@@ -15,6 +15,7 @@ if (nlohmann_json_FOUND)
 | 
				
			|||||||
                INTERFACE_COMPILE_OPTIONS "-sUSE_NLOHMANN_JSON=1"
 | 
					                INTERFACE_COMPILE_OPTIONS "-sUSE_NLOHMANN_JSON=1"
 | 
				
			||||||
                INTERFACE_LINK_LIBRARIES "-sUSE_NLOHMANN_JSON=1"
 | 
					                INTERFACE_LINK_LIBRARIES "-sUSE_NLOHMANN_JSON=1"
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
 | 
					        set(nlohmann_json_LIBRARY "nlohmann_json")
 | 
				
			||||||
else()
 | 
					else()
 | 
				
			||||||
        message(WARNING "You are using an emscripten SDK without nlohmann-json support. Please apply 'emsdk-nlohmann_json.patch' to your local emsdk installation.")
 | 
					        message(WARNING "You are using an emscripten SDK without nlohmann-json support. Please apply 'emsdk-nlohmann_json.patch' to your local emsdk installation.")
 | 
				
			||||||
endif()
 | 
					endif()
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user