1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-26 07:59:09 +00:00

Fix 021c45c: [CMake] detection and use of nlohmann-json for emscripten (#11113)

This commit is contained in:
Loïc Guilloux
2023-07-06 11:49:06 +02:00
committed by GitHub
parent 9f28da4e33
commit 5f2246eabf
3 changed files with 6 additions and 4 deletions

View File

@@ -6,10 +6,10 @@ set(CMAKE_REQUIRED_FLAGS "-sUSE_NLOHMANN_JSON=1")
check_cxx_source_compiles("
#include <nlohmann/json.hpp>
int main() { return 0; }"
NLOHMANN_JSON_FOUND
nlohmann_json_FOUND
)
if (NLOHMANN_JSON_FOUND)
if (nlohmann_json_FOUND)
add_library(nlohmann_json INTERFACE IMPORTED)
set_target_properties(nlohmann_json PROPERTIES
INTERFACE_COMPILE_OPTIONS "-sUSE_NLOHMANN_JSON=1"