clion上,让openwrt用上CMakeLists.txt

#在CMakeLists.txt上添加如下
SET(CMAKE_C_COMPILER "/home/test/openwrt/Toolchain/toolchain/bin/mipsel-openwrt-linux-uclibc-gcc")
SET(CMAKE_CXX_COMPILER "/home/test/openwrt/Toolchain/toolchain/bin/mipsel-openwrt-linux-uclibc-g++")
SET(CMAKE_AR "/home/test/openwrt/Toolchain/toolchain/bin/mipsel-openwrt-linux-uclibc-ar")
SET(CMAKE_LINKER "/home/test/openwrt/Toolchain/toolchain/bin/mipsel-openwrt-linux-uclibc-ld")
SET(CMAKE_RANLIB "/home/test/openwrt/Toolchain/toolchain/bin/mipsel-openwrt-linux-ranlib")
SET(CMAKE_NM "/home/test/openwrt/Toolchain/toolchain/bin/mipsel-openwrt-linux-nm")
SET(CMAKE_OBJDUMP "/home/test/openwrt/Toolchain/toolchain/bin/mipsel-openwrt-linux-objdump")
SET(CMAKE_OBJCOPY "/home/test/openwrt/Toolchain/toolchain/bin/mipsel-openwrt-linux-objcopy")
SET(CMAKE_STRIP "/home/test/openwrt/Toolchain/toolchain/bin/mipsel-openwrt-linux-strip")

#我的openwrt的toolchain地址是:/home/test/openwrt/Toolchain/toolchain

posted @ 2018-02-19 11:24  橙子好甜  阅读(1218)  评论(0编辑  收藏  举报