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:
parent
f2b2fb2819
commit
da3f3a8eac
2 changed files with 14 additions and 6 deletions
|
|
@ -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)
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue