mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-23 01:44:22 +00:00
Introjucer: linux CPU architecture option.
This commit is contained in:
parent
f1f237ebbf
commit
c92c3fc4c8
2 changed files with 24 additions and 4 deletions
|
|
@ -89,8 +89,17 @@ protected:
|
|||
setValueIfVoid (getLibrarySearchPathValue(), "/usr/X11R6/lib/");
|
||||
}
|
||||
|
||||
void createConfigProperties (PropertyListBuilder&)
|
||||
Value getArchitectureType() { return getValue (Ids::linuxArchitecture); }
|
||||
String getArchitectureTypeString() const { return config [Ids::linuxArchitecture]; }
|
||||
|
||||
void createConfigProperties (PropertyListBuilder& props)
|
||||
{
|
||||
const char* const archNames[] = { "(Default)", "32-bit (-m32)", "64-bit (-m64)" };
|
||||
const var archFlags[] = { var(), "-m32", "-m64" };
|
||||
|
||||
props.add (new ChoicePropertyComponent (getArchitectureType(), "Architecture",
|
||||
StringArray (archNames, numElementsInArray (archNames)),
|
||||
Array<var> (archFlags, numElementsInArray (archFlags))));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -157,7 +166,7 @@ private:
|
|||
|
||||
void writeLinkerFlags (OutputStream& out, const BuildConfiguration& config) const
|
||||
{
|
||||
out << " LDFLAGS += -L$(BINDIR) -L$(LIBDIR)";
|
||||
out << " LDFLAGS += " << getArchFlags (config) << "-L$(BINDIR) -L$(LIBDIR)";
|
||||
|
||||
if (makefileIsDLL)
|
||||
out << " -shared";
|
||||
|
|
@ -208,7 +217,8 @@ private:
|
|||
|
||||
out << " -O" << config.getGCCOptimisationFlag() << newLine;
|
||||
|
||||
out << " CXXFLAGS += $(CFLAGS) " << replacePreprocessorTokens (config, getExtraCompilerFlagsString()).trim() << newLine;
|
||||
out << " CXXFLAGS += $(CFLAGS) " << getArchFlags (config)
|
||||
<< replacePreprocessorTokens (config, getExtraCompilerFlagsString()).trim() << newLine;
|
||||
|
||||
writeLinkerFlags (out, config);
|
||||
|
||||
|
|
@ -313,6 +323,15 @@ private:
|
|||
out << "-include $(OBJECTS:%.o=%.d)" << newLine;
|
||||
}
|
||||
|
||||
String getArchFlags (const BuildConfiguration& config) const
|
||||
{
|
||||
if (const MakeBuildConfiguration* makeConfig = dynamic_cast<const MakeBuildConfiguration*> (&config))
|
||||
if (makeConfig->getArchitectureTypeString().isNotEmpty())
|
||||
return makeConfig->getArchitectureTypeString() + " ";
|
||||
|
||||
return String::empty;
|
||||
}
|
||||
|
||||
String getObjectFileFor (const RelativePath& file) const
|
||||
{
|
||||
return file.getFileNameWithoutExtension()
|
||||
|
|
@ -323,4 +342,4 @@ private:
|
|||
};
|
||||
|
||||
|
||||
#endif // __JUCER_PROJECTEXPORT_MAKE_JUCEHEADER__
|
||||
#endif // __JUCER_PROJECTEXPORT_MAKE_JUCEHEADER__
|
||||
|
|
@ -77,6 +77,7 @@ namespace Ids
|
|||
DECLARE_ID (extraFrameworks);
|
||||
DECLARE_ID (winArchitecture);
|
||||
DECLARE_ID (winWarningLevel);
|
||||
DECLARE_ID (linuxArchitecture);
|
||||
DECLARE_ID (toolset);
|
||||
DECLARE_ID (msvcModuleDefinitionFile);
|
||||
DECLARE_ID (bigIcon);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue