Skip to content
Closed
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
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
Loading