From c0514c6380cb20b5a9525e5a551259510343d68c Mon Sep 17 00:00:00 2001 From: David Amador Date: Sun, 10 Mar 2024 08:17:30 +0000 Subject: [PATCH] Xcode 10+ projects now filling FRAMEWORK_SEARCH_PATHS with libdirs --- src/actions/xcode/xcode10.lua | 2 ++ src/host/scripts.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/actions/xcode/xcode10.lua b/src/actions/xcode/xcode10.lua index a412e24f..3b4dad75 100644 --- a/src/actions/xcode/xcode10.lua +++ b/src/actions/xcode/xcode10.lua @@ -32,6 +32,8 @@ if not cfg.flags.ObjcARC then options.CLANG_ENABLE_OBJC_WEAK = "YES" end + + options.FRAMEWORK_SEARCH_PATHS = cfg.libdirs return options end diff --git a/src/host/scripts.c b/src/host/scripts.c index 0dd7de74..b8590851 100644 --- a/src/host/scripts.c +++ b/src/host/scripts.c @@ -455,9 +455,9 @@ const char* builtin_scripts[] = { "nts.xcworkspacedata\", xcode.workspace_generate)\npremake.generate(sln, \"%%.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings\", xcode.workspace_settings)\npremake.generate(sln, \"%%.xcworkspace/xcshareddata/xcschemes/-ALL-.xcscheme\", xcode.workspace_scheme)\nend,\nonproject = function(prj)\npremake.generate(prj, \"%%.xcodeproj/project.pbxproj\", xcode9.project)\nxcode.generate_schemes(prj, \"%%.xcodeproj/xcshareddata/xcschemes\")\nend,\noncleanproject = function(prj)\npremake.clean.directory(prj, \"%%.xcodeproj\")\npremake.clean.directory(prj, \"%%.xcworkspace\")\nend,\noncheckproject = xcode.checkproject,\nxcode = {\niOSTargetPlatformVersion = nil,\nmacOSTargetPlatformVersion = nil,\ntvOSTargetPlatformVersion = nil,\n},\n}\n", /* actions/xcode/xcode10.lua */ - "local premake = premake\npremake.xcode10 = { }\nlocal xcode = premake.xcode\nlocal xcode8 = premake.xcode8\nlocal xcode9 = premake.xcode9\nlocal xcode10 = premake.xcode10\nfunction xcode10.XCBuildConfiguration_Project(tr, prj, cfg)\nlocal options = xcode9.XCBuildConfiguration_Project(tr, prj, cfg)\nreturn table.merge(options, {\nCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = \"YES\",\nCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = \"YES\",\nCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = \"YES\",\nCLANG_WARN_COMMA = \"YES\",\nCLANG_WARN_NON_LITERAL_NULL_CONVERSION = \"YES\",\nCLANG_WARN_OBJC_LITERAL_CONVERSION = \"YES\",\nCLANG_WARN_RANGE_LOOP_ANALYSIS = \"YES\",\nCLANG_WARN_STRICT_PROTOTYPES = \"YES\",\n})\nend\nfunction xcode10.XCBuildConfiguration_Target(tr, target, cfg)\nlocal options = xcode8.XCBuildConfiguration_Target(tr, target, cfg)\nif not cfg.flags.ObjcARC then\noptions.CLANG_ENABLE_OBJC_WEAK = \"YES\"\nend\nreturn options\nend\nfunction xcode10.project(prj)\nlocal tr = xcode.buildprjtree(prj)\nxcode.Header(tr, 48)" - "\nxcode.PBXBuildFile(tr)\nxcode.PBXContainerItemProxy(tr)\nxcode.PBXFileReference(tr,prj)\nxcode.PBXFrameworksBuildPhase(tr)\nxcode.PBXGroup(tr)\nxcode.PBXNativeTarget(tr)\nxcode.PBXProject(tr, \"8.0\")\nxcode.PBXReferenceProxy(tr)\nxcode.PBXResourcesBuildPhase(tr)\nxcode.PBXShellScriptBuildPhase(tr)\nxcode.PBXCopyFilesBuildPhase(tr)\nxcode.PBXSourcesBuildPhase(tr,prj)\nxcode.PBXVariantGroup(tr)\nxcode.PBXTargetDependency(tr)\nxcode.XCBuildConfiguration(tr, prj, {\nontarget = xcode10.XCBuildConfiguration_Target,\nonproject = xcode10.XCBuildConfiguration_Project,\n})\nxcode.XCBuildConfigurationList(tr)\nxcode.Footer(tr)\nend\nnewaction\n{\ntrigger = \"xcode10\",\nshortname = \"Xcode 10\",\ndescription = \"Generate Apple Xcode 10 project files\",\nos = \"macosx\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\", \"Bundle\" },\nvalid_languages = { \"C\", \"C++\" },\nvalid_tools = {\ncc = { \"gcc\" },\n},\nvalid_platforms = {\nNative = \"Nat" - "ive\",\nx32 = \"Native 32-bit\",\nx64 = \"Native 64-bit\",\nUniversal = \"Universal\",\n},\ndefault_platform = \"Native\",\nonsolution = function(sln)\npremake.generate(sln, \"%%.xcworkspace/contents.xcworkspacedata\", xcode.workspace_generate)\npremake.generate(sln, \"%%.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings\", xcode.workspace_settings)\npremake.generate(sln, \"%%.xcworkspace/xcshareddata/xcschemes/-ALL-.xcscheme\", xcode.workspace_scheme)\nend,\nonproject = function(prj)\npremake.generate(prj, \"%%.xcodeproj/project.pbxproj\", xcode10.project)\nxcode.generate_schemes(prj, \"%%.xcodeproj/xcshareddata/xcschemes\")\nend,\noncleanproject = function(prj)\npremake.clean.directory(prj, \"%%.xcodeproj\")\npremake.clean.directory(prj, \"%%.xcworkspace\")\nend,\noncheckproject = xcode.checkproject,\nxcode = {\niOSTargetPlatformVersion = nil,\nmacOSTargetPlatformVersion = nil,\ntvOSTargetPlatformVersion = nil,\n},\n}\n", + "local premake = premake\npremake.xcode10 = { }\nlocal xcode = premake.xcode\nlocal xcode8 = premake.xcode8\nlocal xcode9 = premake.xcode9\nlocal xcode10 = premake.xcode10\nfunction xcode10.XCBuildConfiguration_Project(tr, prj, cfg)\nlocal options = xcode9.XCBuildConfiguration_Project(tr, prj, cfg)\nreturn table.merge(options, {\nCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = \"YES\",\nCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = \"YES\",\nCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = \"YES\",\nCLANG_WARN_COMMA = \"YES\",\nCLANG_WARN_NON_LITERAL_NULL_CONVERSION = \"YES\",\nCLANG_WARN_OBJC_LITERAL_CONVERSION = \"YES\",\nCLANG_WARN_RANGE_LOOP_ANALYSIS = \"YES\",\nCLANG_WARN_STRICT_PROTOTYPES = \"YES\",\n})\nend\nfunction xcode10.XCBuildConfiguration_Target(tr, target, cfg)\nlocal options = xcode8.XCBuildConfiguration_Target(tr, target, cfg)\nif not cfg.flags.ObjcARC then\noptions.CLANG_ENABLE_OBJC_WEAK = \"YES\"\nend\noptions.FRAMEWORK_SEARCH_PATHS = cfg.libdirs\nreturn options\nend\nfunction xcode10.project(prj)\nlocal tr =" + " xcode.buildprjtree(prj)\nxcode.Header(tr, 48)\nxcode.PBXBuildFile(tr)\nxcode.PBXContainerItemProxy(tr)\nxcode.PBXFileReference(tr,prj)\nxcode.PBXFrameworksBuildPhase(tr)\nxcode.PBXGroup(tr)\nxcode.PBXNativeTarget(tr)\nxcode.PBXProject(tr, \"8.0\")\nxcode.PBXReferenceProxy(tr)\nxcode.PBXResourcesBuildPhase(tr)\nxcode.PBXShellScriptBuildPhase(tr)\nxcode.PBXCopyFilesBuildPhase(tr)\nxcode.PBXSourcesBuildPhase(tr,prj)\nxcode.PBXVariantGroup(tr)\nxcode.PBXTargetDependency(tr)\nxcode.XCBuildConfiguration(tr, prj, {\nontarget = xcode10.XCBuildConfiguration_Target,\nonproject = xcode10.XCBuildConfiguration_Project,\n})\nxcode.XCBuildConfigurationList(tr)\nxcode.Footer(tr)\nend\nnewaction\n{\ntrigger = \"xcode10\",\nshortname = \"Xcode 10\",\ndescription = \"Generate Apple Xcode 10 project files\",\nos = \"macosx\",\nvalid_kinds = { \"ConsoleApp\", \"WindowedApp\", \"StaticLib\", \"SharedLib\", \"Bundle\" },\nvalid_languages = { \"C\", \"C++\" },\nvalid_tools = {\ncc = { \"gcc" + "\" },\n},\nvalid_platforms = {\nNative = \"Native\",\nx32 = \"Native 32-bit\",\nx64 = \"Native 64-bit\",\nUniversal = \"Universal\",\n},\ndefault_platform = \"Native\",\nonsolution = function(sln)\npremake.generate(sln, \"%%.xcworkspace/contents.xcworkspacedata\", xcode.workspace_generate)\npremake.generate(sln, \"%%.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings\", xcode.workspace_settings)\npremake.generate(sln, \"%%.xcworkspace/xcshareddata/xcschemes/-ALL-.xcscheme\", xcode.workspace_scheme)\nend,\nonproject = function(prj)\npremake.generate(prj, \"%%.xcodeproj/project.pbxproj\", xcode10.project)\nxcode.generate_schemes(prj, \"%%.xcodeproj/xcshareddata/xcschemes\")\nend,\noncleanproject = function(prj)\npremake.clean.directory(prj, \"%%.xcodeproj\")\npremake.clean.directory(prj, \"%%.xcworkspace\")\nend,\noncheckproject = xcode.checkproject,\nxcode = {\niOSTargetPlatformVersion = nil,\nmacOSTargetPlatformVersion = nil,\ntvOSTargetPlatformVersion = nil,\n},\n}\n", /* actions/xcode/xcode11.lua */ "local premake = premake\npremake.xcode11 = { }\nlocal xcode = premake.xcode\nlocal xcode10 = premake.xcode10\nlocal xcode11 = premake.xcode11\nfunction xcode11.XCBuildConfiguration_Target(tr, target, cfg)\nlocal options = xcode10.XCBuildConfiguration_Target(tr, target, cfg)\noptions.CODE_SIGN_IDENTITY = \"-\"\nreturn options\nend\nfunction xcode11.project(prj)\nlocal tr = xcode.buildprjtree(prj)\nxcode.Header(tr, 48)\nxcode.PBXBuildFile(tr)\nxcode.PBXContainerItemProxy(tr)\nxcode.PBXFileReference(tr,prj)\nxcode.PBXFrameworksBuildPhase(tr)\nxcode.PBXGroup(tr)\nxcode.PBXNativeTarget(tr)\nxcode.PBXProject(tr, \"8.0\")\nxcode.PBXReferenceProxy(tr)\nxcode.PBXResourcesBuildPhase(tr)\nxcode.PBXShellScriptBuildPhase(tr)\nxcode.PBXCopyFilesBuildPhase(tr)\nxcode.PBXSourcesBuildPhase(tr,prj)\nxcode.PBXVariantGroup(tr)\nxcode.PBXTargetDependency(tr)\nxcode.XCBuildConfiguration(tr, prj, {\nontarget = xcode11.XCBuildConfiguration_Target,\nonproject = xcode10.XCBuildConfiguration_Project,\n})\nxcode.XCBuildConfigurationList"