Boost logo

Boost :

Subject: [boost] [Build] How to find a library (ICU)?
From: Artyom (artyomtnk_at_[hidden])
Date: 2010-03-21 18:07:33


Hello,

I'm trying to convert CMake build system for Boost.Locale to Boost.Build
one.

I have one obvious issue: how do find a library?
How do I convert this CMake code to Boost.Build one:

  if(MSVC AND "${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
    set(ICU_SUFFIX "d")
  endif()

  find_library(ICU_UC icuuc${ICU_SUFFIX})
  find_library(ICU_DATA icudt NAMES icudata)
  find_library(ICU_I18N icuin${ICU_SUFFIX} NAMES icui18n${ICU_SUFFIX})
  find_path(ICU_INCLUDE_DIR unicode/unistr.h)

Note: I search for

   icuuc or icuucd under debug/msvc
   icuin or icui18n or icuind under debug/msvc
   icudata or icudt

Also I need the build to fail or disable library if ICU not found.

I've looked into the Jamfile of regex... but it does not look
correctly for debug icu version when debug build is done! (And actually
this is a bug).

Also the code looks like a hack.

Is there any specific way do to this?

Thanks,
  Artyom

      


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk