Skip to content

Commit e558b07

Browse files
committed
add dlldir installation directory for shared libraries
1 parent b0a1eb2 commit e558b07

File tree

3 files changed

+34
-9
lines changed

3 files changed

+34
-9
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ jobs:
585585
cd tools\boost_install\test\${{matrix.lib}}
586586
mkdir __build__ && cd __build__
587587
cmake -DCMAKE_INSTALL_PREFIX=%GITHUB_WORKSPACE%\..\.local -DUSE_BOOST_PACKAGE=1 -DBoost_VERBOSE=ON ${{matrix.copts}} ..
588-
PATH %PATH%;%GITHUB_WORKSPACE%\..\.local\lib;%GITHUB_WORKSPACE%\..\boost-root\stage\lib
588+
PATH %PATH%;%GITHUB_WORKSPACE%\..\.local\bin;%GITHUB_WORKSPACE%\..\boost-root\stage\bin
589589
cmake --build . --config Debug && cmake --build . --config Debug --target check
590590
cmake --build . --config Release && cmake --build . --config Release --target check
591591
cmake --build . --config MinSizeRel && cmake --build . --config MinSizeRel --target check

boost-install-dirs.jam

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

1111
stage.add-install-dir cmakedir : cmake : libdir ;
12+
stage.add-install-dir dlldir : "" : libdir ;
1213

1314
# header-subdir
1415

boost-install.jam

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1215,6 +1215,30 @@ rule install-subdir ( properties * )
12151215
return <location>(libdir)/$(r:E=) ;
12161216
}
12171217

1218+
rule os-dlldir ( properties * )
1219+
{
1220+
local loc = [ property.select <location> : $(properties) ] ;
1221+
if $(loc)
1222+
{
1223+
return $(loc) ;
1224+
}
1225+
1226+
local dll-dir = [ property.select <install-dlldir> : $(properties) ] ;
1227+
if $(dlldir) || [ option.get dlldir ]
1228+
{
1229+
return <location>(dlldir) ;
1230+
}
1231+
1232+
local os = [ property.select <target-os> : $(properties) ] ;
1233+
os = $(os:G=) ;
1234+
if $(os:E=x) in windows cygwin
1235+
{
1236+
return <location>(bindir) ;
1237+
}
1238+
1239+
return <location>(dlldir) ;
1240+
}
1241+
12181242
rule boost-install ( libraries * )
12191243
{
12201244
.debug boost-install $(libraries) ;
@@ -1243,16 +1267,9 @@ rule boost-install ( libraries * )
12431267
install install-libraries-static : $(libraries) : <location>(libdir) <install-dependencies>on <install-type>STATIC_LIB ;
12441268
$(p).mark-target-as-explicit install-libraries-static ;
12451269

1246-
alias install-libraries-shared : install-libraries-shared- ;
1247-
alias install-libraries-shared : install-libraries-shared-cygwin : <target-os>cygwin ;
1270+
install install-libraries-shared : $(libraries) : <install-type>SHARED_LIB <install-type>PDB <install-dependencies>on <install-no-version-symlinks>on <conditional>@boost-install%os-dlldir ;
12481271
$(p).mark-target-as-explicit install-libraries-shared ;
12491272

1250-
install install-libraries-shared- : $(libraries) : <location>(libdir) <install-type>SHARED_LIB <install-type>PDB <install-dependencies>on <install-no-version-symlinks>on ;
1251-
$(p).mark-target-as-explicit install-libraries-shared- ;
1252-
1253-
install install-libraries-shared-cygwin : $(libraries) : <location>(bindir) <install-type>SHARED_LIB <install-type>PDB <install-dependencies>on <install-no-version-symlinks>on ;
1254-
$(p).mark-target-as-explicit install-libraries-shared-cygwin ;
1255-
12561273
install install-unprefixed-static : $(unprefixed) : <install-type>STATIC_LIB <conditional>@boost-install%install-subdir ;
12571274
$(p).mark-target-as-explicit install-unprefixed-static ;
12581275

@@ -1304,16 +1321,23 @@ if [ MATCH --prefix=(.*) : [ modules.peek : ARGV ] ]
13041321
option.set datadir : ;
13051322
option.set datarootdir : ;
13061323
option.set cmakedir : ;
1324+
option.set dlldir : ;
13071325
}
13081326
if [ MATCH --exec-prefix=(.*) : [ modules.peek : ARGV ] ]
13091327
{
13101328
option.set bindir : ;
13111329
option.set libdir : ;
13121330
option.set cmakedir : ;
1331+
option.set dlldir : ;
13131332
}
13141333
if [ MATCH --libdir-prefix=(.*) : [ modules.peek : ARGV ] ]
13151334
{
13161335
option.set cmakedir : ;
1336+
option.set dlldir : ;
1337+
}
1338+
if [ MATCH --bindir-prefix=(.*) : [ modules.peek : ARGV ] ]
1339+
{
1340+
option.set dlldir : ;
13171341
}
13181342
if [ MATCH --dataroot-prefix=(.*) : [ modules.peek : ARGV ] ]
13191343
{

0 commit comments

Comments
 (0)