$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
From: dgregor_at_[hidden]
Date: 2007-05-17 11:44:06
Author: dgregor
Date: 2007-05-17 11:44:05 EDT (Thu, 17 May 2007)
New Revision: 4096
URL: http://svn.boost.org/trac/boost/changeset/4096
Log:
Take a shot at ICU support, but apparently I can't test it on my Mac
Added:
   sandbox/troy/boost_1_34_0/tools/build/CMake/FindICU.cmake
Text files modified: 
   sandbox/troy/boost_1_34_0/libs/regex/src/CMakeLists.txt |    20 +++++++++++---------                    
   1 files changed, 11 insertions(+), 9 deletions(-)
Modified: sandbox/troy/boost_1_34_0/libs/regex/src/CMakeLists.txt
==============================================================================
--- sandbox/troy/boost_1_34_0/libs/regex/src/CMakeLists.txt	(original)
+++ sandbox/troy/boost_1_34_0/libs/regex/src/CMakeLists.txt	2007-05-17 11:44:05 EDT (Thu, 17 May 2007)
@@ -1,10 +1,14 @@
-
-# there is lots of ICU gore that is not included in this
-# CMakeLists.txt file due to a rating of NC-17 by the motion picture
-# association of america.  See the jamfiles for now.
-
+# Look for the ICU library. If we find it, we'll compile in support for ICU
+include(FindICU)
+set(BOOST_REGEX_LIBRARIES)
+if (ICU_FOUND AND ICU_I18N_FOUND)
+  add_definitions(-DBOOST_HAS_ICU=1)
+  include_directories(${ICU_INCLUDE_DIRS})
+  set(BOOST_REGEX_LIBRARIES ${ICU_LIBRARIES} ${ICU_I18N_LIBRARIES})
+endif (ICU_FOUND AND ICU_I18N_FOUND)
+ 
 boost_library(boost_regex
-  c_regex_traits.cpp
+   c_regex_traits.cpp
    cpp_regex_traits.cpp
    cregex.cpp
    fileiter.cpp
@@ -21,12 +25,10 @@
    wide_posix_api.cpp
    winstances.cpp 
    usinstances.cpp 
+   LIBRARIES ${BOOST_REGEX_LIBRARIES}
    SHARED_COMPILE_FLAGS -DBOOST_REGEX_DYN_LINK=1)
 
 
 
 
 
-
-
-
Added: sandbox/troy/boost_1_34_0/tools/build/CMake/FindICU.cmake
==============================================================================
--- (empty file)
+++ sandbox/troy/boost_1_34_0/tools/build/CMake/FindICU.cmake	2007-05-17 11:44:05 EDT (Thu, 17 May 2007)
@@ -0,0 +1,51 @@
+# Finds the International Components for Unicode (ICU) Library
+#
+#  ICU_FOUND          - True if ICU found.
+#  ICU_I18N_FOUND     - True if ICU's internationalization library found.
+#  ICU_INCLUDE_DIRS   - Directory to include to get ICU headers
+#                       Note: always include ICU headers as, e.g., 
+#                       unicode/utypes.h
+#  ICU_LIBRARIES      - Libraries to link against for the common ICU
+#  ICU_I18N_LIBRARIES - Libraries to link against for ICU internationaliation
+#                       (note: in addition to ICU_LIBRARIES)
+
+# Look for the header file.
+find_path(
+  ICU_INCLUDE_DIR 
+  NAMES unicode/utypes.h
+  DOC "Include directory for the ICU library")
+mark_as_advanced(ICU_INCLUDE_DIR)
+
+# Look for the library.
+find_library(
+  ICU_LIBRARY
+  NAMES icuuc cygicuuc cygicuuc32
+  DOC "Libraries to link against for the common parts of ICU")
+mark_as_advanced(ICU_LIBRARY)
+
+# Copy the results to the output variables.
+if(ICU_INCLUDE_DIR AND ICU_LIBRARY)
+  set(ICU_FOUND 1)
+  set(ICU_LIBRARIES ${ICU_LIBRARY})
+  set(ICU_INCLUDE_DIRS ${ICU_INCLUDE_DIR})
+
+  # Look for the ICU internationalization libraries
+  find_library(
+    ICU_I18N_LIBRARY
+    NAMES icuin icui18n cygicuin cygicuin32
+    DOC "Libraries to link against for ICU internationalization")
+  mark_as_advanced(ICU_I18N_LIBRARY)
+  if (ICU_I18N_LIBRARY)
+    set(ICU_I18N_FOUND 1)
+    set(ICU_I18N_LIBRARIES ${ICU_I18N_LIBRARY})
+  else (ICU_I18N_LIBRARY)
+    set(ICU_I18N_FOUND 0)
+    set(ICU_I18N_LIBRARIES)
+  endif (ICU_I18N_LIBRARY)
+else(ICU_INCLUDE_DIR AND ICU_LIBRARY)
+  set(ICU_FOUND 0)
+  set(ICU_I18N_FOUND 0)
+  set(ICU_LIBRARIES)
+  set(ICU_I18N_LIBRARIES)
+  set(ICU_INCLUDE_DIRS)
+endif(ICU_INCLUDE_DIR AND ICU_LIBRARY)