summaryrefslogtreecommitdiffhomepage
path: root/cmake/Toolchain-OpenWRT-ANY.cmake
blob: 888c51ebe8e97a25d4ae27f355a8869492cdf354 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# Toolchain file for building with OpenWRT Toolchain for ANY OpenWRT Target.
# Following prequisition are necessary:
#   - latest cmake version
#   - mruby OpenWRT Package file (not yet in distribution)

# Switch to Cross Compile by setting the system name
SET(CMAKE_SYSTEM_NAME Linux)

# We show CMAKE the compiler, the rest will be guessed by the Toolchain
SET(CMAKE_C_COMPILER "$ENV{OPENWRT_TOOLCHAIN}/bin/$ENV{OPENWRT_TARGETCC}")

# We define an own release flag so that we can adapt the optimal C_FLAGS
SET(CMAKE_C_FLAGS_OPENWRT "$ENV{OPENWRT_TARGETFLAGS}")