Android: CMake 3.25.0 sets LINUX true
Setting global variable LINUX in CMake 3.25.0 is causing problems with Android builds on OSX
CMake 3.25.0 considers ANDROID build on OSX a LINUX target due to the compiler in the android toolchain (__linux__
).
With build systems that handle Linux and Android build targets separately this will cause a lot of problems.
Added following to showcase the problem:
message("#### before project() LINUX = ${LINUX}")
project(${PROJ_NAME})
message("#### after project() LINUX = ${LINUX}")
Outputs the following:
C/C++: debug|arm64-v8a :#### before project() LINUX =
C/C++: debug|arm64-v8a :#### after project() LINUX = 1
Starting to set this flag now is a bit odd choice as many build systems have already built handling for this case. In our case we have a lot of logic using LINUX & ANDROID separately.
Edited by Robert Nevala