diff --git a/CMakeLists.txt b/CMakeLists.txt index 3805198e1..f2e221968 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,8 +44,9 @@ if(POLICY CMP0054) endif() # Configuration fails on < 3.4 if only C++ is enabled (CheckFunctionExists -# macro called from FindX11) -if(NOT CMAKE_VERSION VERSION_LESS 3.4.0) +# macro called from FindX11). Also, Android needs C for compiling some glue +# code. +if(NOT CMAKE_VERSION VERSION_LESS 3.4.0 AND NOT CMAKE_SYSTEM_NAME STREQUAL "Android") set(LANG CXX) endif() project(Magnum ${LANG})