Makefile generator specification at cross compilation with CMake

前端 未结 1 1312
北恋
北恋 2021-01-16 19:43

I have two things I can\'t figure out. (1)When using CMake-GUI, we can specify makefile generator. I am going to cross compile for Raspberry PI with Debian Linu

相关标签:
1条回答
  • 2021-01-16 20:14

    (According to the documentation at http://www.cmake.org/Wiki/CMake_Cross_Compiling)

    You need a toolchain file, and you must instruct CMake to use it, by defining the CMake variable CMAKE_TOOLCHAIN_FILE.

    What is more, if you want to build using that toolchain, your CMake generator must be "Unix Makefile". That means that the build tool will be make instead of Visual Studio. Because I am unsure that CMake can make a Visual Studio project that uses the gcc cross-compiler.

    0 讨论(0)
提交回复
热议问题