Fix FindHarfBuzz.cmake when version not match [ci build]

This commit is contained in:
halx99 2021-04-28 17:04:04 +08:00
parent 881c7672c8
commit 89957435da
1 changed files with 3 additions and 2 deletions

View File

@ -60,15 +60,16 @@ endif ()
if ("${HarfBuzz_FIND_VERSION}" VERSION_GREATER "${HARFBUZZ_VERSION}")
if (HarfBuzz_FIND_REQUIRED)
message(FATAL_ERROR
"Required version (" ${harfbuzz_FIND_VERSION} ")"
"Required version (" ${HarfBuzz_FIND_VERSION} ")"
" is higher than found version (" ${HARFBUZZ_VERSION} ")")
else ()
message(WARNING
"Required version (" ${harfbuzz_FIND_VERSION} ")"
"Required version (" ${HarfBuzz_FIND_VERSION} ")"
" is higher than found version (" ${HARFBUZZ_VERSION} ")")
unset(HARFBUZZ_VERSION)
unset(HARFBUZZ_INCLUDE_DIRS)
unset(HARFBUZZ_LIBRARIES)
return ()
endif ()
endif ()