CMake: specifying build toolchain

前端 未结 1 642
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-02 09:25

Very new to CMake, and so far I\'m finding it to be extremely helpful. I have a set of custom libraries that I would like to build for multiple platforms using cross-compilation

相关标签:
1条回答
  • 2021-02-02 10:06

    Have a look here: basically, you define a "toolchain file" that sets things like the system name, paths to compilers and so on. You then call cmake like so:

    cmake /path/to/src -DCMAKE_TOOLCHAIN_FILE=/path/to/toolchain/foo-bar-baz.cmake
    
    0 讨论(0)
提交回复
热议问题