1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Projucer: Use exporter name, rather than build folder name, to locate pre-built libraries

This commit is contained in:
reuk 2021-03-24 13:00:15 +00:00
parent 3f17cc7b2e
commit 8c9c3c3ca9
No known key found for this signature in database
GPG key ID: 9ADCD339CFC98A11
9 changed files with 34 additions and 7 deletions

View file

@ -61,14 +61,16 @@ void LibraryModule::addSearchPathsToExporter (ProjectExporter& exporter) const
exporter.addToExtraSearchPaths (moduleRelativePath.getParentDirectory());
String libDirPlatform;
const auto libDirPlatform = [&]() -> String
{
if (exporter.isLinux())
return "Linux";
if (exporter.isLinux())
libDirPlatform = "Linux";
else if (exporter.isCodeBlocks() && exporter.isWindows())
libDirPlatform = "MinGW";
else
libDirPlatform = exporter.getTargetFolder().getFileName();
if (exporter.isCodeBlocks() && exporter.isWindows())
return "MinGW";
return exporter.getTypeInfoForExporter (exporter.getExporterIdentifier()).targetFolder;
}();
auto libSubdirPath = moduleRelativePath.toUnixStyle() + "/libs/" + libDirPlatform;
auto moduleLibDir = File (exporter.getProject().getProjectFolder().getFullPathName() + "/" + libSubdirPath);

View file

@ -76,6 +76,8 @@ public:
static String getValueTreeTypeName() { return "ANDROIDSTUDIO"; }
static String getTargetFolderName() { return "Android"; }
Identifier getExporterIdentifier() const override { return getValueTreeTypeName(); }
static const char* getDefaultActivityClass() { return "com.rmsl.juce.JuceActivity"; }
static const char* getDefaultApplicationClass() { return "com.rmsl.juce.JuceApp"; }

View file

@ -57,6 +57,8 @@ public:
static String getValueTreeTypeName() { return "CLION"; }
static String getTargetFolderName() { return "CLion"; }
Identifier getExporterIdentifier() const override { return getValueTreeTypeName(); }
static CLionProjectExporter* createForSettings (Project& projectToUse, const ValueTree& settingsToUse)
{
if (settingsToUse.hasType (getValueTreeTypeName()))

View file

@ -98,6 +98,11 @@ public:
bool isOSX() const override { return false; }
bool isiOS() const override { return false; }
Identifier getExporterIdentifier() const override
{
return isLinux() ? getValueTreeTypeNameLinux() : getValueTreeTypeNameWindows();
}
String getNewLineString() const override { return isWindows() ? "\r\n" : "\n"; }
bool supportsTargetType (build_tools::ProjectType::Target::Type type) const override

View file

@ -1758,6 +1758,8 @@ public:
static String getValueTreeTypeName() { return "VS2015"; }
static String getTargetFolderName() { return "VisualStudio2015"; }
Identifier getExporterIdentifier() const override { return getValueTreeTypeName(); }
int getVisualStudioVersion() const override { return 14; }
String getSolutionComment() const override { return "# Visual Studio 2015"; }
String getToolsVersion() const override { return "14.0"; }
@ -1801,6 +1803,8 @@ public:
static String getValueTreeTypeName() { return "VS2017"; }
static String getTargetFolderName() { return "VisualStudio2017"; }
Identifier getExporterIdentifier() const override { return getValueTreeTypeName(); }
int getVisualStudioVersion() const override { return 15; }
String getSolutionComment() const override { return "# Visual Studio 2017"; }
String getToolsVersion() const override { return "15.0"; }
@ -1844,6 +1848,8 @@ public:
static String getValueTreeTypeName() { return "VS2019"; }
static String getTargetFolderName() { return "VisualStudio2019"; }
Identifier getExporterIdentifier() const override { return getValueTreeTypeName(); }
int getVisualStudioVersion() const override { return 16; }
String getSolutionComment() const override { return "# Visual Studio 2019"; }
String getToolsVersion() const override { return "16.0"; }

View file

@ -379,6 +379,8 @@ public:
static String getValueTreeTypeName() { return "LINUX_MAKE"; }
static String getTargetFolderName() { return "LinuxMakefile"; }
Identifier getExporterIdentifier() const override { return getValueTreeTypeName(); }
static MakefileProjectExporter* createForSettings (Project& projectToUse, const ValueTree& settingsToUse)
{
if (settingsToUse.hasType (getValueTreeTypeName()))

View file

@ -305,6 +305,11 @@ public:
bool isOSX() const override { return ! iOS; }
bool isiOS() const override { return iOS; }
Identifier getExporterIdentifier() const override
{
return iOS ? getValueTreeTypeNameiOS() : getValueTreeTypeNameMac();
}
bool supportsPrecompiledHeaders() const override { return true; }
String getNewLineString() const override { return "\n"; }

View file

@ -121,6 +121,7 @@ ProjectExporter::ExporterTypeInfo ProjectExporter::getTypeInfoForExporter (const
if (iter != typeInfos.end())
return *iter;
jassertfalse;
return {};
}

View file

@ -58,6 +58,8 @@ public:
static bool canProjectBeLaunched (Project*);
virtual Identifier getExporterIdentifier() const = 0;
//==============================================================================
// capabilities of exporter
virtual bool usesMMFiles() const = 0;