Limbo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FindBoost.mk
Go to the documentation of this file.
1 ## @file FindBoost.mk
2 ## @brief find Boost library given BOOST_DIR, set BOOST_LINK_FLAG to either STATIC_LINK_FLAG or DYNAMIC_LINK_FLAG
3 ##
4 ## It check whether Boost library is installed as static library. If so, link to static library; otherwise, link to shared library.
5 ## Use following command in the Makefile to view the results
6 ##
7 ## $(info Boost: BOOST_LINK_FLAG = $(BOOST_LINK_FLAG))
8 ##
9 ## @author Yibo Lin
10 ## @date Jan 2017
11 ##
12 ## @param BOOST_DIR given path to Boost library
13 ## @param BOOST_LINK_FLAG set linking flag to Boost
14 
15 ## @cond
16 
17 BOOST_LINK_FLAG :=
18 
19 # use libboost_system.a to test whether boost has static library
20 ifeq ($(wildcard $(BOOST_DIR)/lib/libboost_system.a),)
21  BOOST_LINK_FLAG = -Wl,-rpath,$(BOOST_DIR)/lib $(DYNAMIC_LINK_FLAG)
22 else
23  BOOST_LINK_FLAG = $(STATIC_LINK_FLAG)
24 endif
25 
26 ## @endcond