From 0a0c5501988ba47bd8beeceaa3b73f813d6145cf Mon Sep 17 00:00:00 2001 From: jules Date: Mon, 11 Apr 2016 11:42:13 +0100 Subject: [PATCH] Projucer: made sure that RTAS files are built with stdcall in MSVC --- .../Source/Project Saving/jucer_ProjectExport_MSVC.h | 9 +++++++-- extras/Projucer/Source/Project/jucer_Project.cpp | 3 --- extras/Projucer/Source/Project/jucer_Project.h | 2 -- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/extras/Projucer/Source/Project Saving/jucer_ProjectExport_MSVC.h b/extras/Projucer/Source/Project Saving/jucer_ProjectExport_MSVC.h index 8a977f9921..5e044277d2 100644 --- a/extras/Projucer/Source/Project Saving/jucer_ProjectExport_MSVC.h +++ b/extras/Projucer/Source/Project Saving/jucer_ProjectExport_MSVC.h @@ -757,6 +757,11 @@ protected: TargetOS::windows))); } + static bool shouldUseStdCall (const RelativePath& path) + { + return path.getFileNameWithoutExtension().startsWithIgnoreCase ("juce_audio_plugin_client_RTAS_"); + } + JUCE_DECLARE_NON_COPYABLE (MSVCProjectExporterBase) }; @@ -903,7 +908,7 @@ protected: addFile (path, parent, projectItem.shouldBeAddedToBinaryResources() || (shouldFileBeCompiledByDefault (path) && ! projectItem.shouldBeCompiled()), - shouldFileBeCompiledByDefault (path) && projectItem.shouldUseStdCall()); + shouldFileBeCompiledByDefault (path) && shouldUseStdCall (path)); } } @@ -1653,7 +1658,7 @@ protected: if (! projectItem.shouldBeCompiled()) e->createNewChildElement ("ExcludedFromBuild")->addTextElement ("true"); - if (projectItem.shouldUseStdCall()) + if (shouldUseStdCall (path)) e->createNewChildElement ("CallingConvention")->addTextElement ("StdCall"); } else if (path.hasFileExtension (headerFileExtensions)) diff --git a/extras/Projucer/Source/Project/jucer_Project.cpp b/extras/Projucer/Source/Project/jucer_Project.cpp index 29fc0ac34a..dd6371f4ae 100644 --- a/extras/Projucer/Source/Project/jucer_Project.cpp +++ b/extras/Projucer/Source/Project/jucer_Project.cpp @@ -726,9 +726,6 @@ bool Project::Item::shouldBeAddedToXcodeResources() const { return state [Ids: Value Project::Item::getShouldInhibitWarningsValue() { return state.getPropertyAsValue (Ids::noWarnings, getUndoManager()); } bool Project::Item::shouldInhibitWarnings() const { return state [Ids::noWarnings]; } -Value Project::Item::getShouldUseStdCallValue() { return state.getPropertyAsValue (Ids::useStdCall, nullptr); } -bool Project::Item::shouldUseStdCall() const { return state [Ids::useStdCall]; } - bool Project::Item::isModuleCode() const { return belongsToModule; } String Project::Item::getFilePath() const diff --git a/extras/Projucer/Source/Project/jucer_Project.h b/extras/Projucer/Source/Project/jucer_Project.h index 4d2f699c5f..0c9f31ff3a 100644 --- a/extras/Projucer/Source/Project/jucer_Project.h +++ b/extras/Projucer/Source/Project/jucer_Project.h @@ -209,8 +209,6 @@ public: Value getShouldInhibitWarningsValue(); bool shouldInhibitWarnings() const; - Value getShouldUseStdCallValue(); - bool shouldUseStdCall() const; bool isModuleCode() const;