Bump up the minimum cmake version slightly, and make older versions happy with the regex in FindHarfbuzz.cmake.

This commit is contained in:
arcum42 2020-05-19 22:15:47 -07:00
parent efe3bc1613
commit c8c27cbfd1
2 changed files with 3 additions and 3 deletions

View File

@ -7,7 +7,7 @@ project(Pcsx2)
#
# Setting it to a range tells it that it supports the features on the newer
# versions as well, avoiding setting policies.
cmake_minimum_required(VERSION 3.0.2...3.17)
cmake_minimum_required(VERSION 3.3.0...3.17)
# Variable to check that people use the good file
set(TOP_CMAKE_WAS_SOURCED TRUE)

View File

@ -86,7 +86,7 @@ if (HarfBuzz_INCLUDE_DIR AND NOT HarfBuzz_VERSION)
if (EXISTS "${HarfBuzz_INCLUDE_DIR}/hb-version.h")
file(READ "${HarfBuzz_INCLUDE_DIR}/hb-version.h" _harfbuzz_version_content)
string(REGEX MATCH "#define +HB_VERSION_STRING +\"([0-9]+\.[0-9]+\.[0-9]+)\"" _dummy "${_harfbuzz_version_content}")
string(REGEX MATCH "#define +HB_VERSION_STRING +\"([0-9]+\\.[0-9]+\\.[0-9]+)\"" _dummy "${_harfbuzz_version_content}")
set(HarfBuzz_VERSION "${CMAKE_MATCH_1}")
endif ()
endif ()
@ -178,4 +178,4 @@ mark_as_advanced(
if (HarfBuzz_FOUND)
set(HarfBuzz_LIBRARIES ${HarfBuzz_LIBRARY} ${HarfBuzz_ICU_LIBRARY})
set(HarfBuzz_INCLUDE_DIRS ${HarfBuzz_INCLUDE_DIR})
endif ()
endif ()