Browse Source

Introjucer: Added MSVC option for using DLL runtime lib.

tags/2021-05-28
jules 13 years ago
parent
commit
ab7c03a99e
5 changed files with 14 additions and 8 deletions
  1. +8
    -4
      extras/Introjucer/Source/Project Saving/jucer_ProjectExport_MSVC.h
  2. +0
    -1
      extras/Introjucer/Source/Project Saving/jucer_ProjectExporter.cpp
  3. +1
    -1
      extras/Introjucer/Source/Project Saving/jucer_ProjectExporter.h
  4. +4
    -2
      extras/Introjucer/Source/Project/jucer_AudioPluginModule.h
  5. +1
    -0
      extras/Introjucer/Source/Utility/jucer_PresetIDs.h

+ 8
- 4
extras/Introjucer/Source/Project Saving/jucer_ProjectExport_MSVC.h View File

@@ -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)\\");


+ 0
- 1
extras/Introjucer/Source/Project Saving/jucer_ProjectExporter.cpp View File

@@ -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()),


+ 1
- 1
extras/Introjucer/Source/Project Saving/jucer_ProjectExporter.h View File

@@ -146,7 +146,7 @@ public:
//==============================================================================
String msvcTargetSuffix;
StringPairArray msvcExtraPreprocessorDefs;
bool msvcIsDLL, msvcIsWindowsSubsystem, msvcNeedsDLLRuntimeLib;
bool msvcIsDLL, msvcIsWindowsSubsystem;
String msvcDelayLoadedDLLs;
//==============================================================================


+ 4
- 2
extras/Introjucer/Source/Project/jucer_AudioPluginModule.h View File

@@ -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
{


+ 1
- 0
extras/Introjucer/Source/Utility/jucer_PresetIDs.h View File

@@ -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…
Cancel
Save