forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use ICU to implement basic string functions.
Swift SVN r25803
- Loading branch information
Showing
7 changed files
with
446 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Find libicu's libraries | ||
|
||
include(FindPackageHandleStandardArgs) | ||
|
||
find_package(PkgConfig) | ||
|
||
set(ICU_REQUIRED) | ||
foreach(MODULE ${ICU_FIND_COMPONENTS}) | ||
string(TOUPPER "${MODULE}" MODULE) | ||
string(TOLOWER "${MODULE}" module) | ||
list(APPEND ICU_REQUIRED | ||
ICU_${MODULE}_INCLUDE_DIR ICU_${MODULE}_LIBRARIES) | ||
|
||
pkg_check_modules(PC_ICU_${MODULE} QUIET icu-${module}) | ||
if(${PC_ICU_${MODULE}_FOUND}) | ||
set(ICU_${MODULE}_DEFINITIONS ${PC_ICU_${MODULE}_CFLAGS_OTHER}) | ||
|
||
find_path(ICU_${MODULE}_INCLUDE_DIR unicode | ||
HINTS ${PC_ICU_${MODULE}_INCLUDEDIR} ${PC_ICU_${MODULE}_INCLUDE_DIRS}) | ||
set(ICU_${MODULE}_INCLUDE_DIR ${ICU_${MODULE}_INCLUDE_DIR}) | ||
|
||
find_library(ICU_${MODULE}_LIBRARY NAMES icu${module} | ||
HINTS ${PC_ICU_${MODULE}_LIBDIR} ${PC_ICU_${MODULE}_LIBRARY_DIRS}) | ||
set(ICU_${MODULE}_LIBRARIES ${ICU_${MODULE}_LIBRARY}) | ||
endif() | ||
endforeach() | ||
|
||
find_package_handle_standard_args(ICU DEFAULT_MSG ${ICU_REQUIRED}) | ||
mark_as_advanced(${ICU_REQUIRED}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.