File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 1+ # This example file is for ARMv7 cross builds on Fedora 42.
2+ # The toolchain used is https://musl.cc/armv7m-linux-musleabi-cross.tgz
3+ set (CMAKE_SYSTEM_NAME Linux)
4+ set (CMAKE_SYSTEM_PROCESSOR arm)
5+ set (CMAKE_C_COMPILE_OPTIONS_SYSROOT "--sysroot=" )
6+ set (CMAKE_CXX_COMPILE_OPTIONS_SYSROOT "--sysroot=" )
7+
8+ set (TOOLCHAIN_DIR /home/user/toolchains/armv7m-linux-musleabi-cross/)
9+ set (CMAKE_C_COMPILER ${TOOLCHAIN_DIR} /bin/armv7m-linux-musleabi-gcc)
10+ set (CMAKE_ASM_COMPILER ${TOOLCHAIN_DIR} /bin/armv7m-linux-musleabi-gcc)
11+ set (CMAKE_CROSS_COMPILING 1)
12+
13+ set (CMAKE_SYSROOT /home/user/toolchains/armv7m-linux-musleabi-cross/armv7m-linux-musleabi/)
14+
15+ set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
16+ set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
17+ set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
18+
19+ set (CMAKE_CROSSCOMPILING_EMULATOR qemu-arm-static ;-L;${CMAKE_SYSROOT} )
You can’t perform that action at this time.
0 commit comments