Reputation: 793
I am working on a project where I am linking against a library which was itself linked against boost 1.48
. I am looking for a way to specify in my CMakeLists.txt
that I want the system to find and only use the boost 1.48 library.
I am not able to update the version the other library was compiled against and so I cannot set a minimum version number I need a way to set the only acceptable boost version. I have not been able to find a method to do this.
Upvotes: 1
Views: 1745
Reputation: 50036
You should use find_package:
format is as follows:
find_package(package version EXACT REQUIRED COMPONENTS components…)
so if you need exactly 1.48 then you should use (example):
find_package(Boost 1.48 EXACT REQUIRED COMPONENTS system thread date_time)
Upvotes: 7