Skip to content

Commit 41163c1

Browse files
committed
Install .dll files into (bindir) on non-Cygwin Windows as well; add --dlldir override support
1 parent 8747e91 commit 41163c1

2 files changed

Lines changed: 25 additions & 6 deletions

File tree

boost-install-dirs.jam

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import path ;
88
import stage ;
99

1010
stage.add-install-dir cmakedir : cmake : libdir ;
11+
stage.add-install-dir dlldir : "" : bindir ;
1112

1213
# header-subdir
1314

boost-install.jam

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ rule generate-cmake-variant- ( target : sources * : properties * )
488488
print.text
489489

490490
"set_target_properties($(target) PROPERTIES"
491-
" IMPORTED_LOCATION_$(variant:U) \"${_BOOST_LIBDIR}/$(dll-name)\""
491+
" IMPORTED_LOCATION_$(variant:U) \"${_BOOST_DLLDIR}/$(dll-name)\""
492492
" )"
493493
""
494494
: true ;
@@ -770,6 +770,10 @@ rule make-cmake-config ( target : sources * : properties * )
770770
libdir = [ path.relative-to $(cmakedir) $(libdir) ] ;
771771
.info " libdir=" $(libdir) ;
772772

773+
local dlldir = [ stage.get-dir dlldir : $(ps) : Boost ] ;
774+
dlldir = [ path.relative-to $(cmakedir) $(dlldir) ] ;
775+
.info " dlldir=" $(dlldir) ;
776+
773777
local lname = [ MATCH boost_(.*) : $(name) ] ;
774778
.info " lname=" $(lname) ;
775779

@@ -837,6 +841,7 @@ rule make-cmake-config ( target : sources * : properties * )
837841
else
838842
{
839843
get-dir "_BOOST_LIBDIR" : $(libdir) ;
844+
get-dir "_BOOST_DLLDIR" : $(dlldir) ;
840845

841846
print.text
842847

@@ -872,6 +877,7 @@ rule make-cmake-config ( target : sources * : properties * )
872877
"unset(_BOOST_LIBDIR)"
873878
"unset(_BOOST_INCLUDEDIR)"
874879
"unset(_BOOST_CMAKEDIR)"
880+
"unset(_BOOST_DLLDIR)"
875881
""
876882
"if(NOT __boost_variants AND (Boost_VERBOSE OR Boost_DEBUG))"
877883
" message(STATUS \" Library has no variants and is considered not found\")"
@@ -1261,14 +1267,15 @@ rule boost-install ( libraries * )
12611267
$(p).mark-target-as-explicit install-libraries-static ;
12621268

12631269
alias install-libraries-shared : install-libraries-shared- ;
1264-
alias install-libraries-shared : install-libraries-shared-cygwin : <target-os>cygwin ;
1270+
alias install-libraries-shared : install-libraries-shared-windows : <target-os>windows ;
1271+
alias install-libraries-shared : install-libraries-shared-windows : <target-os>cygwin ;
12651272
$(p).mark-target-as-explicit install-libraries-shared ;
12661273

12671274
install install-libraries-shared- : $(libraries) : <location>(libdir) <install-type>SHARED_LIB <install-type>PDB <install-dependencies>on <install-no-version-symlinks>on : <install-package>Boost ;
12681275
$(p).mark-target-as-explicit install-libraries-shared- ;
12691276

1270-
install install-libraries-shared-cygwin : $(libraries) : <location>(bindir) <install-type>SHARED_LIB <install-type>PDB <install-dependencies>on <install-no-version-symlinks>on : <install-package>Boost ;
1271-
$(p).mark-target-as-explicit install-libraries-shared-cygwin ;
1277+
install install-libraries-shared-windows : $(libraries) : <location>(dlldir) <install-type>SHARED_LIB <install-type>PDB <install-dependencies>on <install-no-version-symlinks>on : <install-package>Boost ;
1278+
$(p).mark-target-as-explicit install-libraries-shared-windows ;
12721279

12731280
install install-unprefixed-static : $(unprefixed) : <install-type>STATIC_LIB <conditional>@boost-install%install-subdir : <install-package>Boost ;
12741281
$(p).mark-target-as-explicit install-unprefixed-static ;
@@ -1316,6 +1323,7 @@ rule boost-install ( libraries * )
13161323

13171324
# If --{parent} is explicitly specified on the command line, then we need to
13181325
# clear every dir setting in config files that depends on it
1326+
13191327
if [ MATCH --prefix=(.*) : [ modules.peek : ARGV ] ]
13201328
{
13211329
option.set exec-prefix : ;
@@ -1325,18 +1333,28 @@ if [ MATCH --prefix=(.*) : [ modules.peek : ARGV ] ]
13251333
option.set datadir : ;
13261334
option.set datarootdir : ;
13271335
option.set cmakedir : ;
1336+
option.set dlldir : ;
13281337
}
1338+
13291339
if [ MATCH --exec-prefix=(.*) : [ modules.peek : ARGV ] ]
13301340
{
13311341
option.set bindir : ;
13321342
option.set libdir : ;
13331343
option.set cmakedir : ;
1344+
option.set dlldir : ;
1345+
}
1346+
1347+
if [ MATCH --bindir=(.*) : [ modules.peek : ARGV ] ]
1348+
{
1349+
option.set dlldir : ;
13341350
}
1335-
if [ MATCH --libdir-prefix=(.*) : [ modules.peek : ARGV ] ]
1351+
1352+
if [ MATCH --libdir=(.*) : [ modules.peek : ARGV ] ]
13361353
{
13371354
option.set cmakedir : ;
13381355
}
1339-
if [ MATCH --dataroot-prefix=(.*) : [ modules.peek : ARGV ] ]
1356+
1357+
if [ MATCH --datarootdir=(.*) : [ modules.peek : ARGV ] ]
13401358
{
13411359
option.set datadir : ;
13421360
}

0 commit comments

Comments
 (0)