mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Linux: Disabled creating position independent executables for GUI apps
This commit is contained in:
parent
3e73e11d82
commit
3659742a3a
2 changed files with 25 additions and 11 deletions
|
|
@ -485,17 +485,25 @@ private:
|
|||
|
||||
const auto packages = getPackages();
|
||||
|
||||
if (config.exporter.isLinux() && packages.size() > 0)
|
||||
if (config.exporter.isLinux())
|
||||
{
|
||||
if (target.isDynamicLibrary())
|
||||
flags.add ("-shared");
|
||||
|
||||
auto pkgconfigLibs = String ("`pkg-config --libs");
|
||||
for (auto p : packages)
|
||||
pkgconfigLibs << " " << p;
|
||||
if (target.type == ProjectType::Target::StandalonePlugIn
|
||||
|| target.type == ProjectType::Target::GUIApp)
|
||||
flags.add ("-no-pie");
|
||||
|
||||
pkgconfigLibs << "`";
|
||||
flags.add (pkgconfigLibs);
|
||||
if (packages.size() > 0)
|
||||
{
|
||||
String pkgconfigLibs ("`pkg-config --libs");
|
||||
|
||||
for (auto p : packages)
|
||||
pkgconfigLibs << " " << p;
|
||||
|
||||
pkgconfigLibs << "`";
|
||||
flags.add (pkgconfigLibs);
|
||||
}
|
||||
}
|
||||
|
||||
return getCleanedStringArray (flags);
|
||||
|
|
|
|||
|
|
@ -113,6 +113,10 @@ public:
|
|||
if (getTargetFileType() == pluginBundle)
|
||||
result.add ("-Wl,--no-undefined");
|
||||
}
|
||||
else if (type == GUIApp || type == StandalonePlugIn)
|
||||
{
|
||||
result.add ("-no-pie");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
@ -289,7 +293,8 @@ public:
|
|||
|
||||
out << "$(JUCE_LDFLAGS) ";
|
||||
|
||||
if (getTargetFileType() == sharedLibraryOrDLL || getTargetFileType() == pluginBundle)
|
||||
if (getTargetFileType() == sharedLibraryOrDLL || getTargetFileType() == pluginBundle
|
||||
|| type == GUIApp || type == StandalonePlugIn)
|
||||
out << "$(JUCE_LDFLAGS_" << getTargetVarName() << ") ";
|
||||
|
||||
out << "$(RESOURCES) $(TARGET_ARCH)" << newLine;
|
||||
|
|
@ -374,11 +379,12 @@ public:
|
|||
//==============================================================================
|
||||
bool anyTargetIsSharedLibrary() const
|
||||
{
|
||||
const int n = targets.size();
|
||||
for (int i = 0; i < n; ++i)
|
||||
for (auto* target : targets)
|
||||
{
|
||||
const ProjectType::Target::TargetFileType fileType = targets.getUnchecked (i)->getTargetFileType();
|
||||
if (fileType == ProjectType::Target::sharedLibraryOrDLL || fileType == ProjectType::Target::pluginBundle)
|
||||
const ProjectType::Target::TargetFileType fileType = target->getTargetFileType();
|
||||
|
||||
if (fileType == ProjectType::Target::sharedLibraryOrDLL
|
||||
|| fileType == ProjectType::Target::pluginBundle)
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue