Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES.txt1
-rw-r--r--src/actions/xcode/xcode_common.lua6
-rw-r--r--tests/actions/xcode/test_xcode_project.lua25
3 files changed, 32 insertions, 0 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index a40b51a..6052e7f 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -59,6 +59,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
-------
diff --git a/src/actions/xcode/xcode_common.lua b/src/actions/xcode/xcode_common.lua
index 1870d48..b9f67de 100644
--- a/src/actions/xcode/xcode_common.lua
+++ b/src/actions/xcode/xcode_common.lua
@@ -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)
diff --git a/tests/actions/xcode/test_xcode_project.lua b/tests/actions/xcode/test_xcode_project.lua
index a5071fe..b7ea96a 100644
--- a/tests/actions/xcode/test_xcode_project.lua
+++ b/tests/actions/xcode/test_xcode_project.lua
@@ -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()