Jason Perkins avatar Jason Perkins committed 01ad2e1

Patch 3367642: Add support for targetextension property to Xcode

Comments (0)

Files changed (3)

 * Patch 3476176: Fix dependencies of precompiled header in makefile (Konstantin Tokarev)
 * Patch 3476176: Remove conditionals from makefile compiler assignments (Konstantin Tokarev)
 * Pull 1: Fixed path to Info.plist in Xcode projects (Adrien Anselme)
+* Patch 3367642: Add support for targetextension property to Xcode
 
 
 -------

src/actions/xcode/xcode_common.lua

 			_p(4,'EXECUTABLE_PREFIX = %s;', cfg.buildtarget.prefix)
 		end
 		
+		if cfg.targetextension then
+			local ext = cfg.targetextension
+			ext = iif(ext:startswith("."), ext:sub(2), ext)
+			_p(4,'EXECUTABLE_EXTENSION = %s;', ext)
+		end
+
 		local outdir = path.getdirectory(cfg.buildtarget.bundlepath)
 		if outdir ~= "." then
 			_p(4,'CONFIGURATION_BUILD_DIR = %s;', outdir)

tests/actions/xcode/test_xcode_project.lua

 		]]
 	end
 
+
+	function suite.XCBuildConfigurationTarget_OnTargetExtension()
+		kind "SharedLib"
+		targetextension ".xyz"
+		prepare()
+		xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], tr.configs[1])
+		test.capture [[
+		[libMyProject.xyz:Debug] /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				EXECUTABLE_PREFIX = lib;
+				EXECUTABLE_EXTENSION = xyz;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_MODEL_TUNING = G5;
+				INSTALL_PATH = /usr/local/lib;
+				PRODUCT_NAME = "MyProject";
+			};
+			name = "Debug";
+		};
+		]]
+	end
+
+
 	function suite.XCBuildConfigurationTarget_OnInfoPlist()
 		files { "../../MyProject-Info.plist" }
 		prepare()
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.