This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Patch 3367642: Add support for targetextension property to Xcode

  • Loading branch information...
starkos committed Oct 4, 2012
1 parent e578a43 commit 31bafb455f32ee7d787e049a5c9e93d021afa11b
Showing with 32 additions and 0 deletions.
  1. +1 −0 CHANGES.txt
  2. +6 −0 src/actions/xcode/xcode_common.lua
  3. +25 −0 tests/actions/xcode/test_xcode_project.lua
View
@@ -83,6 +83,7 @@
* 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
-------
@@ -683,6 +683,12 @@
_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)
@@ -960,6 +960,31 @@
]]
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()

0 comments on commit 31bafb4

Please sign in to comment.