开发者

cmake cross compiling

开发者 https://www.devze.com 2023-02-09 11:05 出处:网络
On ubuntu 10.10 64bit I want to compile something with cmake for a 32 bit开发者_如何学C ubuntu 10.10 system. How can I do that via a shell command in cmake?In CMakeLists.txt add

On ubuntu 10.10 64bit I want to compile something with cmake for a 32 bit开发者_如何学C ubuntu 10.10 system. How can I do that via a shell command in cmake?


In CMakeLists.txt add

CMAKE_CXX_FLAGS="-m32"
CMAKE_C_FLAGS="-m32"

make sure that any libraries you are linking to are compiled for 32 bit.

0

精彩评论

暂无评论...
验证码 换一张
取 消