diff --git a/CMakeLists.txt b/CMakeLists.txt index 72f43a27..37405f38 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,6 +32,11 @@ else() if(APPLE) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-shorten-64-to-32") endif() + + # if android, use -Os + if(ANDROID) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Os") + endif() endif() include_directories(${CMAKE_CURRENT_LIST_DIR}/include)