Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

- change ICU_LINK configuration #70

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
212 changes: 144 additions & 68 deletions build/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import os ;
import toolset ;
import project ;
import feature ;
import errors ;
# Features

feature.feature boost.locale.iconv : on off : optional propagated ;
Expand Down Expand Up @@ -65,8 +66,37 @@ ICU_LINK = [ modules.peek : ICU_LINK ] ;

if $(ICU_LINK)
{
ICU_OPTS = <include>$(ICU_PATH)/include <linkflags>$(ICU_LINK) <dll-path>$(ICU_PATH)/bin <runtime-link>shared ;
ICU64_OPTS = <include>$(ICU_PATH)/include <linkflags>$(ICU_LINK) <dll-path>$(ICU_PATH)/bin64 <runtime-link>shared ;
errors.user-error : "The ICU_LINK option is no longer supported by the Boost.Locale build - please refer to the documentation for equivalent options" ;
}

if [ modules.peek : ICU_ICUUC_NAME ]
{
ICU_ICUUC_NAME = [ modules.peek : ICU_ICUUC_NAME ] ;
}
if [ modules.peek : ICU_ICUDT_NAME ]
{
ICU_ICUDT_NAME = [ modules.peek : ICU_ICUDT_NAME ] ;
}
if [ modules.peek : ICU_ICUIN_NAME ]
{
ICU_ICUIN_NAME = [ modules.peek : ICU_ICUIN_NAME ] ;
}
if [ modules.peek : ICU_ICUUC_NAME64 ]
{
ICU_ICUUC_NAME64 = [ modules.peek : ICU_ICUUC_NAME64 ] ;
}
if [ modules.peek : ICU_ICUDT_NAME64 ]
{
ICU_ICUDT_NAME64 = [ modules.peek : ICU_ICUDT_NAME64 ] ;
}
if [ modules.peek : ICU_ICUIN_NAME64 ]
{
ICU_ICUIN_NAME64 = [ modules.peek : ICU_ICUIN_NAME64 ] ;
}

if $(ICU_ICUUC_NAME)
{
lib icuuc : : <name>$(ICU_ICUUC_NAME) ;
}
else
{
Expand All @@ -83,7 +113,15 @@ else
<runtime-link>shared ;

searched-lib icuuc : : <name>this_is_an_invalid_library_name ;
}


if $(ICU_ICUDT_NAME)
{
lib icudt : : <name>$(ICU_ICUDT_NAME) ;
}
else
{
searched-lib icudt : : <search>$(ICU_PATH)/lib
<name>icudata
<link>shared
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be consistent should use either lib or search-lib targets. The regex build uses lib consistently.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay, I'll try to change that

Expand All @@ -96,7 +134,14 @@ else
<runtime-link>shared ;

searched-lib icudt : : <name>this_is_an_invalid_library_name ;
}

if $(ICU_ICUIN_NAME)
{
lib icuin : : <name>$(ICU_ICUIN_NAME) ;
}
else
{
searched-lib icuin : : <search>$(ICU_PATH)/lib
<name>icui18n
<link>shared
Expand All @@ -117,77 +162,108 @@ else
<runtime-link>shared ;

searched-lib icuin : : <name>this_is_an_invalid_library_name ;
}
explicit icuuc icudt icuin ;

ICU_OPTS =
<include>$(ICU_PATH)/include
<runtime-link>shared:<library>icuuc/<link>shared
<runtime-link>shared:<library>icudt/<link>shared
<runtime-link>shared:<library>icuin/<link>shared
<runtime-link>static:<library>icuuc
<runtime-link>static:<library>icudt
<runtime-link>static:<library>icuin
<dll-path>$(ICU_PATH)/bin
<define>BOOST_HAS_ICU=1
<runtime-link>static:<define>U_STATIC_IMPLEMENTATION=1
<toolset>msvc:<find-static-library>advapi32
;

explicit icuuc icudt icuin ;

ICU_OPTS = <include>$(ICU_PATH)/include
<library>icuuc/<link>shared/<runtime-link>shared
<library>icudt/<link>shared/<runtime-link>shared
<library>icuin/<link>shared/<runtime-link>shared
<dll-path>$(ICU_PATH)/bin
<runtime-link>shared ;



searched-lib icuuc_64 : : <name>icuuc
<search>$(ICU_PATH)/lib64
<link>shared
<runtime-link>shared ;

searched-lib icuuc_64 : : <toolset>msvc
<variant>debug
<name>icuucd
<search>$(ICU_PATH)/lib64
<link>shared
<runtime-link>shared ;

searched-lib icuuc_64 : : <name>this_is_an_invalid_library_name ;

searched-lib icudt_64 : : <search>$(ICU_PATH)/lib64
<name>icudata
<link>shared
<runtime-link>shared ;

searched-lib icudt_64 : : <search>$(ICU_PATH)/lib64
<name>icudt
<toolset>msvc
<link>shared
<runtime-link>shared ;

searched-lib icudt_64 : : <name>this_is_an_invalid_library_name ;

searched-lib icuin_64 : : <search>$(ICU_PATH)/lib64
<name>icui18n
<link>shared
<runtime-link>shared ;

searched-lib icuin_64 : : <toolset>msvc
<variant>debug
<name>icuind
<search>$(ICU_PATH)/lib64
<link>shared
<runtime-link>shared ;

searched-lib icuin_64 : : <toolset>msvc
<variant>release
<name>icuin
<search>$(ICU_PATH)/lib64
<link>shared
<runtime-link>shared ;

searched-lib icuin_64 : : <name>this_is_an_invalid_library_name ;

explicit icuuc_64 icudt_64 icuin_64 ;

ICU64_OPTS = <include>$(ICU_PATH)/include
<library>icuuc_64/<link>shared/<runtime-link>shared
<library>icudt_64/<link>shared/<runtime-link>shared
<library>icuin_64/<link>shared/<runtime-link>shared
<dll-path>$(ICU_PATH)/bin64
<runtime-link>shared ;
if $(ICU_ICUUC_NAME64)
{
lib icuuc_64 : : <name>$(ICU_ICUUC_NAME64) ;
}
else
{
searched-lib icuuc_64 : : <name>icuuc
<search>$(ICU_PATH)/lib64
<link>shared
<runtime-link>shared ;

searched-lib icuuc_64 : : <toolset>msvc
<variant>debug
<name>icuucd
<search>$(ICU_PATH)/lib64
<link>shared
<runtime-link>shared ;

searched-lib icuuc_64 : : <name>this_is_an_invalid_library_name ;
}

if $(ICU_ICUDT_NAME64)
{
lib icudt_64 : : <name>$(ICU_ICUDT_NAME64) ;
}
else
{
searched-lib icudt_64 : : <search>$(ICU_PATH)/lib64
<name>icudata
<link>shared
<runtime-link>shared ;

searched-lib icudt_64 : : <search>$(ICU_PATH)/lib64
<name>icudt
<toolset>msvc
<link>shared
<runtime-link>shared ;

searched-lib icudt_64 : : <name>this_is_an_invalid_library_name ;
}

if $(ICU_ICUIN_NAME64)
{
lib icuin_64 : : <name>$(ICU_ICUIN_NAME64) ;
}
else
{
searched-lib icuin_64 : : <search>$(ICU_PATH)/lib64
<name>icui18n
<link>shared
<runtime-link>shared ;

searched-lib icuin_64 : : <toolset>msvc
<variant>debug
<name>icuind
<search>$(ICU_PATH)/lib64
<link>shared
<runtime-link>shared ;

searched-lib icuin_64 : : <toolset>msvc
<variant>release
<name>icuin
<search>$(ICU_PATH)/lib64
<link>shared
<runtime-link>shared ;

searched-lib icuin_64 : : <name>this_is_an_invalid_library_name ;
}
explicit icuuc_64 icudt_64 icuin_64 ;

ICU64_OPTS =
<include>$(ICU_PATH)/include
<runtime-link>shared:<library>icuuc_64/<link>shared
<runtime-link>shared:<library>icudt_64/<link>shared
<runtime-link>shared:<library>icuin_64/<link>shared
<runtime-link>static:<library>icuuc_64
<runtime-link>static:<library>icudt_64
<runtime-link>static:<library>icuin_64
<dll-path>$(ICU_PATH)/bin64
<define>BOOST_HAS_ICU=1
<runtime-link>static:<define>U_STATIC_IMPLEMENTATION=1
<toolset>msvc:<find-static-library>advapi32
;


obj has_icu_obj : ../build/has_icu_test.cpp : $(ICU_OPTS) ;
obj has_icu64_obj : ../build/has_icu_test.cpp : $(ICU64_OPTS) ;
Expand Down
2 changes: 1 addition & 1 deletion build/has_icu_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <unicode/coll.h>

#if defined(_MSC_VER) && !defined(_DLL)
#error "Mixing ICU with a static runtime doesn't work"
//#error "Mixing ICU with a static runtime doesn't work"
#endif

int main()
Expand Down