Skip to content

Commit 212e3ab

Browse files
committed
[cmake] Remove duplicated Find ICU in CoreFoundation.
The patch passes the ICU_ROOT from the top level CMakeList.txt into the CoreFoundation one and performs a find_package to find the right include path. It also uses the Find ICU script from the top level, instead of the duplicated script (which has been removed).
1 parent df500e2 commit 212e3ab

File tree

3 files changed

+4
-255
lines changed

3 files changed

+4
-255
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ ExternalProject_Add(CoreFoundation
3939
-DCF_ENABLE_LIBDISPATCH=${FOUNDATION_ENABLE_LIBDISPATCH}
4040
-DCF_PATH_TO_LIBDISPATCH_SOURCE=${FOUNDATION_PATH_TO_LIBDISPATCH_SOURCE}
4141
-DCF_PATH_TO_LIBDISPATCH_BUILD=${FOUNDATION_PATH_TO_LIBDISPATCH_BUILD}
42-
-DICU_INCLUDE_DIR=${ICU_INCLUDE_DIR}
42+
-DICU_ROOT=${ICU_ROOT}
4343
INSTALL_COMMAND
4444
${CMAKE_COMMAND} -E env --unset=DESTDIR ${CMAKE_COMMAND} --build . --target install)
4545
ExternalProject_Get_Property(CoreFoundation install_dir)

CoreFoundation/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11

22
cmake_minimum_required(VERSION 3.4.3)
33
list(APPEND CMAKE_MODULE_PATH
4-
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
4+
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules"
5+
"${CMAKE_CURRENT_SOURCE_DIR}/../cmake/modules")
56

67
project(CoreFoundation
78
VERSION
@@ -355,7 +356,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL Linux OR CMAKE_SYSTEM_NAME STREQUAL Android)
355356
find_package(ICU COMPONENTS uc i18n REQUIRED)
356357
target_include_directories(CoreFoundation
357358
PRIVATE
358-
${ICU_INCLUDE_DIR})
359+
${ICU_INCLUDE_DIRS})
359360
else()
360361
target_include_directories(CoreFoundation
361362
PRIVATE
@@ -455,4 +456,3 @@ if(CF_ENABLE_LIBDISPATCH)
455456
${CF_PATH_TO_LIBDISPATCH_SOURCE}/src/BlocksRuntime)
456457
endif()
457458
endif()
458-

CoreFoundation/cmake/modules/FindICU.cmake

Lines changed: 0 additions & 251 deletions
This file was deleted.

0 commit comments

Comments
 (0)