[英]Cross compile with cmake for arm with static linked boost library
what I have: 我有的:
what I want: 我想要的是:
One CMake project which does the follows: 一个CMake项目,它执行以下操作:
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. 恕我直言,主要问题是告诉cmake,对于第二个构建,它应该使用另一个(这次是arm)预编译的boost库进行链接。 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. 假设您使用
find_package(Boost ..)
搜索和选择增强组件(如您find_package(Boost ..)
),并且如果我正确地回答了问题,则可以仅在两个不同的目录中构建(您很可能已经这样做),并以不同的方式设置CMake Variable BOOST_ROOT 在配置之前 。
You can also just set Boost_LIBRARIES later in case the rest is equal. 您还可以稍后设置Boost_LIBRARIES ,以防其他情况相同。
To tell CMake to link Boost statically just set Boost_USE_STATIC_LIBS to ON . 要告诉CMake静态链接Boost,只需将Boost_USE_STATIC_LIBS设置为ON即可 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.