Browse Source

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

tags/2021-05-28
tpoole 9 years ago
parent
commit
da3f3a8eac
2 changed files with 14 additions and 6 deletions
  1. +9
    -2
      extras/Projucer/Source/Project Saving/jucer_ProjectExport_CodeBlocks.h
  2. +5
    -4
      extras/Projucer/Source/Project Saving/jucer_ProjectExport_Make.h

+ 9
- 2
extras/Projucer/Source/Project Saving/jucer_ProjectExport_CodeBlocks.h 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)
};

+ 5
- 4
extras/Projucer/Source/Project Saving/jucer_ProjectExport_Make.h 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:


Loading…
Cancel
Save