VERY experimental Nintendo Switch 2 emulator
C++
Add version check to Findnlohmann_json.cmake
Markus Wick3dc9eec98d84
diff --git a/externals/find-modules/Findnlohmann_json.cmake b/externals/find-modules/Findnlohmann_json.cmakeindex a3bf1d774e..b0c5b3e4e6 100644--- a/externals/find-modules/Findnlohmann_json.cmake+++ b/externals/find-modules/Findnlohmann_json.cmake@@ -8,11 +8,25 @@ find_path(nlohmann_json_INCLUDE_DIRPATH_SUFFIXES nlohmann)+if(nlohmann_json_INCLUDE_DIR)+ file(STRINGS "${nlohmann_json_INCLUDE_DIR}/json.hpp" _nlohmann_json_version_lines+ REGEX "#define[ \t]+NLOHMANN_JSON_VERSION_(MAJOR|MINOR|PATCH)")+ string(REGEX REPLACE ".*NLOHMANN_JSON_VERSION_MAJOR +\([0-9]+\).*" "\\1" _nlohmann_json_version_major "${_nlohmann_json_version_lines}")+ string(REGEX REPLACE ".*NLOHMANN_JSON_VERSION_MINOR +\([0-9]+\).*" "\\1" _nlohmann_json_version_minor "${_nlohmann_json_version_lines}")+ string(REGEX REPLACE ".*NLOHMANN_JSON_VERSION_PATCH +\([0-9]+\).*" "\\1" _nlohmann_json_version_patch "${_nlohmann_json_version_lines}")+ set(nlohmann_json_VERSION "${_nlohmann_json_version_major}.${_nlohmann_json_version_minor}.${_nlohmann_json_version_patch}")+ unset(_nlohmann_json_version_major)+ unset(_nlohmann_json_version_minor)+ unset(_nlohmann_json_version_patch)+ unset(_nlohmann_json_version_lines)+endif()+include(FindPackageHandleStandardArgs)find_package_handle_standard_args(nlohmann_jsonFOUND_VAR nlohmann_json_FOUNDREQUIRED_VARSnlohmann_json_INCLUDE_DIR+ nlohmann_json_VERSIONVERSION_VAR nlohmann_json_VERSION)