Great! Thank the persond who pointed me http://www.boost.org/boost-build2/doc/html/bbv2/tutorial/prebuilt.html page. (the comment disappeared) It seems to be, I did read this page not carefully. And target lib with file property does the thing I searched for. Thanks!
As for using google test and boost build I did this way: I made Jamfile for google-test. It is very simple:
gtest.lib/Jamfile
project gtest_main
: requirements <include>../../../libs/gtest-1.6.0/include
<include>../../../libs/gtest-1.6.0/
: source-location ../../../libs/gtest-1.6.0
: build-dir ../../../libs/gtest-1.6.0/bin.b2 ;
lib gtest_main : src/gtest_main.cc src/gtest-all.cc : <link>static ;
Then, somewhere in my project file:
use-project /gtest : ./gtest.lib ;
and mentioning //gtest in project's requirements section.