From 62101b554cc26fd877be96ea901513412dd0fe2b Mon Sep 17 00:00:00 2001 From: hogliux Date: Tue, 18 Jul 2017 12:23:02 +0100 Subject: [PATCH] Android: Fixed an issue where optimisation flags would be ignored by Android Studio/gradle --- .../Source/Project Saving/jucer_ProjectExport_Android.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/extras/Projucer/Source/Project Saving/jucer_ProjectExport_Android.h b/extras/Projucer/Source/Project Saving/jucer_ProjectExport_Android.h index b61e985dd5..ca51b3cc39 100644 --- a/extras/Projucer/Source/Project Saving/jucer_ProjectExport_Android.h +++ b/extras/Projucer/Source/Project Saving/jucer_ProjectExport_Android.h @@ -584,9 +584,11 @@ private: if (getProject().getProjectType().isStaticLibrary()) mo << " targets \"" << getNativeModuleBinaryName (cfg) << "\"" << newLine; - mo << " arguments \"-DJUCE_BUILD_CONFIGFURATION=" << cfg.getProductFlavourCMakeIdentifier() << "\"" << newLine; - mo << " cFlags \"-O" << cfg.getGCCOptimisationFlag() << "\"" << newLine; - mo << " cppFlags \"-O" << cfg.getGCCOptimisationFlag() << "\"" << newLine; + mo << " arguments \"-DJUCE_BUILD_CONFIGFURATION=" << cfg.getProductFlavourCMakeIdentifier() << "\"" + << ", \"-DCMAKE_CXX_FLAGS_" << (cfg.isDebug() ? "DEBUG" : "RELEASE") + << "=-O" << cfg.getGCCOptimisationFlag() << "\"" + << ", \"-DCMAKE_C_FLAGS_" << (cfg.isDebug() ? "DEBUG" : "RELEASE") + << "=-O" << cfg.getGCCOptimisationFlag() << "\"" << newLine; mo << " }" << newLine; mo << " }" << newLine; mo << " }" << newLine;