what I have:
what I want:
One CMake project which does the follows:
Is this possible, and if so, how?
IMHO the main issue is to tell cmake, that for the second build it should use another (this time for arm) precompiled boost library to link. No idea how to do.
Assumed that you use find_package(Boost ..)
to search and select boost components (as you should) and if I get your question right you can just build in two different directories (as you most likely do already) and set CMake Variable BOOST_ROOT differently before configuring.
You can also just set Boost_LIBRARIES later in case the rest is equal.
To tell CMake to link Boost statically just set Boost_USE_STATIC_LIBS to ON .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.