Reputation: 11
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.
Upvotes: 1
Views: 1103
Reputation: 9748
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.
Upvotes: 1