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

Fixed bug creating dynamic libraries with the Linux Makefile and Code::Blocks exporters

This commit is contained in:
tpoole 2017-01-12 11:54:51 +00:00
parent f2b2fb2819
commit da3f3a8eac
2 changed files with 14 additions and 6 deletions

View file

@ -138,9 +138,9 @@ public:
}
//==============================================================================
void addPlatformSpecificSettingsForProjectType (const ProjectType&) override
void addPlatformSpecificSettingsForProjectType (const ProjectType& type) override
{
// no-op.
createDynamicLibrary = type.isAudioPlugin() || type.isDynamicLibrary();
}
private:
@ -243,6 +243,9 @@ private:
if (config.exporter.isLinux())
{
if (createDynamicLibrary)
flags.add ("-fPIC");
if (linuxPackages.size() > 0)
{
auto pkgconfigFlags = String ("`pkg-config --cflags");
@ -272,6 +275,9 @@ private:
if (config.exporter.isLinux() && linuxPackages.size() > 0)
{
if (createDynamicLibrary)
flags.add ("-shared");
auto pkgconfigLibs = String ("`pkg-config --libs");
for (auto p : linuxPackages)
pkgconfigLibs << " " << p;
@ -467,6 +473,7 @@ private:
}
CodeBlocksOS os;
bool createDynamicLibrary = false;
JUCE_DECLARE_NON_COPYABLE (CodeBlocksProjectExporter)
};

View file

@ -117,11 +117,12 @@ public:
if (type.isStaticLibrary())
makefileTargetSuffix = ".a";
else if (type.isDynamicLibrary())
makefileTargetSuffix = ".so";
else if (type.isAudioPlugin())
else if (type.isAudioPlugin() || type.isDynamicLibrary())
{
makefileIsDLL = true;
if (type.isDynamicLibrary())
makefileTargetSuffix = ".so";
}
}
protected: