Skip to content

Commit 021533b

Browse files
committed
Add ICU version check to ensure minimum of version 61 is used.
1 parent 5515b06 commit 021533b

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ find_package(CURL REQUIRED)
2020
find_package(ICU COMPONENTS uc i18n REQUIRED)
2121
find_package(LibXml2 REQUIRED)
2222

23+
set(ICU_MINIMUM_VERSION 61)
24+
if(ICU_VERSION VERSION_LESS ${ICU_MINIMUM_VERSION})
25+
message(FATAL_ERROR "ICU version ${ICU_VERSION} is less than required version ${ICU_MINIMUM_VERSION}")
26+
endif()
27+
28+
2329
include(SwiftSupport)
2430
include(GNUInstallDirs)
2531
include(ExternalProject)

CoreFoundation/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,12 @@ if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
378378
PRIVATE
379379
${CURL_INCLUDE_DIRS})
380380
find_package(ICU COMPONENTS uc i18n REQUIRED)
381+
382+
set(ICU_MINIMUM_VERSION 61)
383+
if(ICU_VERSION VERSION_LESS ${ICU_MINIMUM_VERSION})
384+
message(FATAL_ERROR "ICU version ${ICU_VERSION} is less than required version ${ICU_MINIMUM_VERSION}")
385+
endif()
386+
message(STATUS "ICU_INCLUDE_DIR: ${ICU_INCLUDE_DIR}")
381387
target_include_directories(CoreFoundation
382388
PRIVATE
383389
${ICU_INCLUDE_DIR})

0 commit comments

Comments
 (0)