diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CLion.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CLion.h index 32b99c2107..cb9a9b2d8a 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CLion.h +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CLion.h @@ -172,7 +172,7 @@ public: out.setNewLineString ("\n"); out << "# Automatically generated CMakeLists, created by the Projucer" << newLine - << "# Don't edit this file! Your changes will be overwritten when you re-save the Projucer project!" << newLine + << "# Do not edit this file! Your changes will be overwritten when you re-save the Projucer project!" << newLine << newLine; out << "cmake_minimum_required (VERSION 3.4.1)" << newLine @@ -336,7 +336,7 @@ private: functionName = "add_executable"; if (exporter.isCodeBlocks() && exporter.isWindows() - && target->type != ProjectType::Target::Type::ConsoleApp) + && target->type != ProjectType::Target::Type::ConsoleApp) properties.add ("WIN32"); break; @@ -670,7 +670,7 @@ private: //============================================================================== void writeCMakeListsXcodeSection (OutputStream& out, XcodeProjectExporter& exporter) const { - // We need to dind out the SDK root before defining the project. Unfortunately this is + // We need to find out the SDK root before defining the project. Unfortunately this is // set per-target in the Xcode project, but we want it per-configuration. for (ProjectExporter::ConstConfigIterator c (exporter); c.next();) { @@ -679,8 +679,8 @@ private: for (auto* target : exporter.targets) { if (target->getTargetFileType() == ProjectType::Target::TargetFileType::macOSAppex - || target->type == ProjectType::Target::Type::AggregateTarget - || target->type == ProjectType::Target::Type::AudioUnitv3PlugIn) + || target->type == ProjectType::Target::Type::AggregateTarget + || target->type == ProjectType::Target::Type::AudioUnitv3PlugIn) continue; auto targetAttributes = target->getTargetSettings (config); @@ -708,7 +708,7 @@ private: continue; if (target->type == ProjectType::Target::Type::AudioUnitPlugIn) - out << "find_program (RC_COMPILER Rez NO_DEFAULT_PATHS PATHS /Applications/Xcode.app/Contents/Developer/usr/bin)" << newLine + out << "find_program (RC_COMPILER Rez NO_DEFAULT_PATHS PATHS \"/Applications/Xcode.app/Contents/Developer/usr/bin\")" << newLine << "if (NOT RC_COMPILER)" << newLine << " message (WARNING \"failed to find Rez; older resource-based AU plug-ins may not work correctly\")" << newLine << "endif (NOT RC_COMPILER)" << newLine << newLine; @@ -919,9 +919,12 @@ private: auto resSourcesVar = targetVarName + "_REZ_SOURCES"; auto resOutputVar = targetVarName + "_REZ_OUTPUT"; + auto sdkVersion = config.getOSXSDKVersionString().upToFirstOccurrenceOf (" ", false, false); + auto sysroot = "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX" + sdkVersion + ".sdk"; + out << "if (RC_COMPILER)" << newLine << " set (" << resSourcesVar << newLine - << " \"" << item.determineGroupFolder().getFullPathName() + "/include_juce_audio_plugin_client_AU.r\"" << newLine + << " " << item.determineGroupFolder().getChildFile ("include_juce_audio_plugin_client_AU.r").getFullPathName().quoted() << newLine << " )" << newLine << " set (" << resOutputVar << " \"${CMAKE_CURRENT_BINARY_DIR}/" << binaryName << ".rsrc\")" << newLine << " target_sources (" << targetVarName << " PRIVATE" << newLine @@ -930,7 +933,8 @@ private: << " )" << newLine << " execute_process (COMMAND" << newLine << " ${RC_COMPILER}" << newLine - << " " << rezFlags.unquoted().removeCharacters ("\\") << newLine; + << " " << rezFlags.unquoted().removeCharacters ("\\") << newLine + << " -isysroot " << sysroot.quoted() << newLine; for (auto& path : headerSearchPaths) {