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

module for creation of toolset projects for libs #296

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 4 additions & 0 deletions doc/src/tasks.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -726,3 +726,7 @@ managers. Currently the supported ones are:

* Conan (`conan`): currently supports the
link:https://docs.conan.io/en/latest/reference/generators/b2.html[`b2 generator`].

:leveloffset: +1
include::../../src/tools/vcpkg.jam[tag=doc]
:leveloffset: -1
4 changes: 4 additions & 0 deletions doc/src/tools.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ include::../../src/tools/asciidoctor.jam[tag=doc]

== Miscellaneous Tools

:leveloffset: +2
include::../../src/tools/external.jam[tag=doc]
:leveloffset: -2

:leveloffset: +2
include::../../src/tools/pkg-config.jam[tag=doc]
:leveloffset: -2
Expand Down
16 changes: 16 additions & 0 deletions src/build/ac.jam
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,17 @@ class ac-library : basic-target
else
{
local use-environment ;
local vcpkg-ps ;
if ! $(self.library-name) && ! $(self.include-path) && ! $(self.library-path)
{
use-environment = true ;
local vcpkg-proj = [ project.target vcpkg : allow-missing ] ;
if $(vcpkg-proj)
{
vcpkg-ps = [ targets.generate-from-reference
/vcpkg//prefix : $(vcpkg-proj) : $(property-set) ] ;
}

}
local libnames = $(self.library-name) ;
if ! $(libnames) && $(use-environment)
Expand All @@ -213,12 +221,20 @@ class ac-library : basic-target
libnames ?= $(self.default-names) ;

local include-path = $(self.include-path) ;
if ! $(include-path) && $(vcpkg-ps)
{
include-path = [ $(vcpkg-ps).get <include> ] ;
}
if ! $(include-path) && $(use-environment)
{
include-path = [ os.environ $(name:U)_INCLUDE ] ;
}

local library-path = $(self.library-path) ;
if ! $(library-path) && $(vcpkg-ps)
{
library-path = [ $(vcpkg-ps).get <search> ] ;
}
if ! $(library-path) && $(use-environment)
{
library-path = [ os.environ $(name:U)_LIBRARY_PATH ] ;
Expand Down
3 changes: 3 additions & 0 deletions src/build/project.jam
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,8 @@ rule initialize (
ECHO "Initializing project '$(module-name)'" ;
}

.init-stack = $(module-name) $(.init-stack) ;

local jamroot ;

local parent-module ;
Expand Down Expand Up @@ -642,6 +644,7 @@ rule initialize (
}

.current-project = [ target $(module-name) ] ;
.init-stack = $(.init-stack[2-]) ;
}


Expand Down
Loading