mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Introjucer: Added MSVC option for using DLL runtime lib.
This commit is contained in:
parent
ba0cb5f2a9
commit
ab7c03a99e
5 changed files with 14 additions and 8 deletions
|
|
@ -153,6 +153,9 @@ protected:
|
|||
Value getWholeProgramOptValue() { return getValue (Ids::wholeProgramOptimisation); }
|
||||
bool shouldDisableWholeProgramOpt() const { return static_cast<int> (config [Ids::wholeProgramOptimisation]) > 0; }
|
||||
|
||||
Value getUsingRuntimeLibDLL() { return getValue (Ids::useRuntimeLibDLL); }
|
||||
bool isUsingRuntimeLibDLL() const { return config [Ids::useRuntimeLibDLL]; }
|
||||
|
||||
String getOutputFilename (const String& suffix, bool forceSuffix) const
|
||||
{
|
||||
const String target (File::createLegalFileName (getTargetBinaryNameString().trim()));
|
||||
|
|
@ -175,6 +178,7 @@ protected:
|
|||
"Always disable link-time code generation", nullptr };
|
||||
const var wpoValues[] = { var(), var (1) };
|
||||
|
||||
props.add (new BooleanPropertyComponent (getUsingRuntimeLibDLL(), "Runtime Library", "Use DLL version of runtime library"));
|
||||
props.add (new ChoicePropertyComponent (getWholeProgramOptValue(), "Whole Program Optimisation",
|
||||
StringArray (wpoNames), Array<var> (wpoValues, numElementsInArray (wpoValues))));
|
||||
|
||||
|
|
@ -739,8 +743,8 @@ protected:
|
|||
|
||||
compiler->setAttribute ("AdditionalIncludeDirectories", replacePreprocessorTokens (config, getHeaderSearchPaths (config).joinIntoString (";")));
|
||||
compiler->setAttribute ("PreprocessorDefinitions", getPreprocessorDefs (config, ";"));
|
||||
compiler->setAttribute ("RuntimeLibrary", msvcNeedsDLLRuntimeLib ? (isDebug ? 3 : 2) // MT DLL
|
||||
: (isDebug ? 1 : 0)); // MT static
|
||||
compiler->setAttribute ("RuntimeLibrary", config.isUsingRuntimeLibDLL() ? (isDebug ? 3 : 2) // MT DLL
|
||||
: (isDebug ? 1 : 0)); // MT static
|
||||
compiler->setAttribute ("RuntimeTypeInfo", "true");
|
||||
compiler->setAttribute ("UsePrecompiledHeader", "0");
|
||||
compiler->setAttribute ("PrecompiledHeaderFile", getIntDirFile (config.getOutputFilename (".pch", true)));
|
||||
|
|
@ -1141,8 +1145,8 @@ protected:
|
|||
includePaths.add ("%(AdditionalIncludeDirectories)");
|
||||
cl->createNewChildElement ("AdditionalIncludeDirectories")->addTextElement (includePaths.joinIntoString (";"));
|
||||
cl->createNewChildElement ("PreprocessorDefinitions")->addTextElement (getPreprocessorDefs (config, ";") + ";%(PreprocessorDefinitions)");
|
||||
cl->createNewChildElement ("RuntimeLibrary")->addTextElement (msvcNeedsDLLRuntimeLib ? (isDebug ? "MultiThreadedDebugDLL" : "MultiThreadedDLL")
|
||||
: (isDebug ? "MultiThreadedDebug" : "MultiThreaded"));
|
||||
cl->createNewChildElement ("RuntimeLibrary")->addTextElement (config.isUsingRuntimeLibDLL() ? (isDebug ? "MultiThreadedDebugDLL" : "MultiThreadedDLL")
|
||||
: (isDebug ? "MultiThreadedDebug" : "MultiThreaded"));
|
||||
cl->createNewChildElement ("RuntimeTypeInfo")->addTextElement ("true");
|
||||
cl->createNewChildElement ("PrecompiledHeader");
|
||||
cl->createNewChildElement ("AssemblerListingLocation")->addTextElement ("$(IntDir)\\");
|
||||
|
|
|
|||
|
|
@ -141,7 +141,6 @@ ProjectExporter::ProjectExporter (Project& project_, const ValueTree& settings_)
|
|||
makefileIsDLL (false),
|
||||
msvcIsDLL (false),
|
||||
msvcIsWindowsSubsystem (true),
|
||||
msvcNeedsDLLRuntimeLib (false),
|
||||
settings (settings_),
|
||||
project (project_),
|
||||
projectType (project_.getProjectType()),
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ public:
|
|||
//==============================================================================
|
||||
String msvcTargetSuffix;
|
||||
StringPairArray msvcExtraPreprocessorDefs;
|
||||
bool msvcIsDLL, msvcIsWindowsSubsystem, msvcNeedsDLLRuntimeLib;
|
||||
bool msvcIsDLL, msvcIsWindowsSubsystem;
|
||||
String msvcDelayLoadedDLLs;
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -350,7 +350,6 @@ namespace RTASHelpers
|
|||
if (exporter.isVisualStudio())
|
||||
{
|
||||
exporter.msvcTargetSuffix = ".dpm";
|
||||
exporter.msvcNeedsDLLRuntimeLib = true;
|
||||
|
||||
String winbag (getRTASFolderRelativePath (exporter).getChildFile ("WinBag").toWindowsStyle());
|
||||
|
||||
|
|
@ -375,6 +374,7 @@ namespace RTASHelpers
|
|||
for (ProjectExporter::ConfigIterator config (exporter); config.next();)
|
||||
{
|
||||
config->getValue (Ids::msvcModuleDefinitionFile) = msvcPathToRTASFolder + "juce_RTAS_WinExports.def";
|
||||
config->getValue (Ids::useRuntimeLibDLL) = true;
|
||||
|
||||
if (config->getValue (Ids::postbuildCommand).toString().isEmpty())
|
||||
config->getValue (Ids::postbuildCommand) = "copy /Y \"" + msvcPathToRTASFolder + "juce_RTAS_WinResources.rsr"
|
||||
|
|
@ -532,7 +532,9 @@ namespace AAXHelpers
|
|||
if (exporter.isVisualStudio())
|
||||
{
|
||||
exporter.msvcTargetSuffix = ".aaxplugin";
|
||||
exporter.msvcNeedsDLLRuntimeLib = true;
|
||||
|
||||
for (ProjectExporter::ConfigIterator config (exporter); config.next();)
|
||||
config->getValue (Ids::useRuntimeLibDLL) = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ namespace Ids
|
|||
DECLARE_ID (prebuildCommand);
|
||||
DECLARE_ID (postbuildCommand);
|
||||
DECLARE_ID (generateManifest);
|
||||
DECLARE_ID (useRuntimeLibDLL);
|
||||
DECLARE_ID (wholeProgramOptimisation);
|
||||
DECLARE_ID (juceLinkage);
|
||||
DECLARE_ID (buildVST);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue