VERY experimental Nintendo Switch 2 emulator
C++
Add version check for catch2
Markus Wick585ee1cf4eba
diff --git a/externals/find-modules/FindCatch2.cmake b/externals/find-modules/FindCatch2.cmakeindex a83c668bfb..ce1d40baec 100644--- a/externals/find-modules/FindCatch2.cmake+++ b/externals/find-modules/FindCatch2.cmake@@ -8,11 +8,25 @@ find_path(Catch2_INCLUDE_DIRPATH_SUFFIXES catch2)+if(Catch2_INCLUDE_DIR)+ file(STRINGS "${Catch2_INCLUDE_DIR}/catch.hpp" _Catch2_version_lines+ REGEX "#define[ \t]+CATCH_VERSION_(MAJOR|MINOR|PATCH)")+ string(REGEX REPLACE ".*CATCH_VERSION_MAJOR +\([0-9]+\).*" "\\1" _Catch2_version_major "${_Catch2_version_lines}")+ string(REGEX REPLACE ".*CATCH_VERSION_MINOR +\([0-9]+\).*" "\\1" _Catch2_version_minor "${_Catch2_version_lines}")+ string(REGEX REPLACE ".*CATCH_VERSION_PATCH +\([0-9]+\).*" "\\1" _Catch2_version_patch "${_Catch2_version_lines}")+ set(Catch2_VERSION "${_Catch2_version_major}.${_Catch2_version_minor}.${_Catch2_version_patch}")+ unset(_Catch2_version_major)+ unset(_Catch2_version_minor)+ unset(_Catch2_version_patch)+ unset(_Catch2_version_lines)+endif()+include(FindPackageHandleStandardArgs)find_package_handle_standard_args(Catch2FOUND_VAR Catch2_FOUNDREQUIRED_VARSCatch2_INCLUDE_DIR+ Catch2_VERSIONVERSION_VAR Catch2_VERSION)