summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorAllen Winter <allen.winter@kdab.com>2014-11-07 18:11:16 -0500
committerAllen Winter <allen.winter@kdab.com>2014-11-07 18:11:16 -0500
commitaed82c3bd167bf9fd21f6d71aa8285df6d3ec1dd (patch)
tree6ec436fd02186196882baf1951a1f8fdff24b50a /cmake
parentc6d80a27f2da264b2165820aa9c6d0d165aea298 (diff)
downloadlibical-git-aed82c3bd167bf9fd21f6d71aa8285df6d3ec1dd.tar.gz
FindICU.cmake - fix version discovery (look in uvernum.h now)
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/FindICU.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmake/modules/FindICU.cmake b/cmake/modules/FindICU.cmake
index a091faff..4776932f 100644
--- a/cmake/modules/FindICU.cmake
+++ b/cmake/modules/FindICU.cmake
@@ -8,6 +8,10 @@
# ICU_LIBRARY - Library to link against for the common ICU
# ICU_I18N_LIBRARY - Library to link against for ICU internationaliation
# (note: in addition to ICU_LIBRARY)
+# ICU_VERSION - ICU version MAJOR.MINOR
+# ICU_MAJOR_VERSION - ICU major version
+# ICO_MINOR_VERSION - ICU minor version
+#
if(ICU_INCLUDE_DIR AND ICU_LIBRARY)
# Already in cache, be silent
@@ -39,7 +43,7 @@ if (ICU_INCLUDE_DIR AND ICU_LIBRARY)
set(ICU_VERSION 0)
set(ICU_MAJOR_VERSION 0)
set(ICU_MINOR_VERSION 0)
- file(READ "${ICU_INCLUDE_DIR}/unicode/uversion.h" _ICU_VERSION_CONENTS)
+ file(READ "${ICU_INCLUDE_DIR}/unicode/uvernum.h" _ICU_VERSION_CONENTS)
string(REGEX REPLACE ".*#define U_ICU_VERSION_MAJOR_NUM ([0-9]+).*" "\\1" ICU_MAJOR_VERSION "${_ICU_VERSION_CONENTS}")
string(REGEX REPLACE ".*#define U_ICU_VERSION_MINOR_NUM ([0-9]+).*" "\\1" ICU_MINOR_VERSION "${_ICU_VERSION_CONENTS}")