Browse Source

CLion: Fix a bug creating plug-in bundles on MacOS

tags/2021-05-28
Tom Poole 7 years ago
parent
commit
c1af194af8
1 changed files with 14 additions and 0 deletions
  1. +14
    -0
      extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CLion.h

+ 14
- 0
extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CLion.h View File

@@ -185,6 +185,11 @@ public:
// We'll append to this later.
overwriteFileIfDifferentOrThrow (getTargetFolder().getChildFile ("CMakeLists.txt"), out);
// CMake has stopped adding PkgInfo files to bundles, so we need to do it manually
MemoryOutputStream pkgInfoOut;
pkgInfoOut << "BNDL????";
overwriteFileIfDifferentOrThrow (getTargetFolder().getChildFile ("PkgInfo"), out);
}
void writeCMakeListsExporterSection (ProjectExporter* exporter) const
@@ -364,8 +369,17 @@ private:
for (auto& fileInfo : fileInfoList)
out << " " << fileInfo.first.quoted() << newLine;
auto isCMakeBundle = exporter.isXcode() && target->getTargetFileType() == ProjectType::Target::TargetFileType::pluginBundle;
String pkgInfoPath = File (getTargetFolder().getChildFile ("pkgInfo")).getFullPathName().quoted();
if (isCMakeBundle)
out << " " << pkgInfoPath << newLine;
out << ")" << newLine << newLine;
if (isCMakeBundle)
out << "set_source_files_properties (" << pkgInfoPath << " PROPERTIES MACOSX_PACKAGE_LOCATION .)" << newLine;
for (auto& fileInfo : fileInfoList)
if (! fileInfo.second)
out << "set_source_files_properties (" << fileInfo.first.quoted() << " PROPERTIES HEADER_FILE_ONLY TRUE)" << newLine;


Loading…
Cancel
Save