Reputation: 2936
My project uses boost while there are two version of boost(The old one is used for other projects).
In my CMakeList.txt, I use find_package
to find boost. Unfortunately, it finds an old version of boost, how to solve this case?
My solution is use a var to overwrite ${Boost_INCLUDE_DIRS}
, is there any elegant solution?
Another problem is that I can not use the grammer below:
if(ENV{LOCAL_LIBDOUBANM_INCLUDE_DIR})
blabla
endif()
Upvotes: 0
Views: 73
Reputation: 526
You can add the version you want to the find_package command, i.e. find_package(Boost 1.50 REQUIRED)
. See this question.
Upvotes: 2