Is there a proper way to check whether a build is done for OpenWRT in CMake?
We want to compile a package on multiple platforms (OpenWRT, OS X, Linux) and for OpenWRT specifically we have a dependency on uci.
We where hoping that there would be a CMake variable that we could use to determine whether where building for OpenWRT, but we can't find one.
CMake variables: http://www.cmake.org/Wiki/CMake_Useful_Variables
The place where most general OpenWRT variables seem to be set:
http://git.openwrt.org/?p=14.07/openwrt … 670107#l39
Out best hack at the moment is using:
if(CMAKE_SYSTEMNAME STREQUAL Linux AND CMAKE_CROSSCOMPILING)
endif
A way to check wheter uci was enables would also work, but a general openwrt check would still be nice.