From 947661686bd09bd6b3607634a1678e215b268c46 Mon Sep 17 00:00:00 2001 From: starkos Date: Thu, 20 Aug 2009 20:38:42 +0000 Subject: [PATCH] Added target and objects directories --- src/actions/xcode/xcode_pbxproj.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/actions/xcode/xcode_pbxproj.lua b/src/actions/xcode/xcode_pbxproj.lua index dbb5314a..d9bbd28d 100644 --- a/src/actions/xcode/xcode_pbxproj.lua +++ b/src/actions/xcode/xcode_pbxproj.lua @@ -20,7 +20,10 @@ function xcode.getfiletype(fname) local types = { [".c" ] = "sourcecode.c.c", + [".cc" ] = "sourcecode.cpp.cpp", + [".cpp" ] = "sourcecode.cpp.cpp", [".css" ] = "text.css", + [".cxx" ] = "sourcecode.cpp.cpp", [".gif" ] = "image.gif", [".h" ] = "sourcecode.c.h", [".html"] = "text.html", @@ -307,6 +310,8 @@ _p('\t\t\tisa = XCBuildConfiguration;') _p('\t\t\tbuildSettings = {') _p('\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;') + _p('\t\t\t\tCONFIGURATION_BUILD_DIR = %s;', cfg.buildtarget.directory) + _p('\t\t\t\tCONFIGURATION_TEMP_DIR = %s;', cfg.objectsdir) if cfg.flags.Symbols then _p('\t\t\t\tCOPY_PHASE_STRIP = NO;') end @@ -315,6 +320,11 @@ _p('\t\t\t\tGCC_ENABLE_FIX_AND_CONTINUE = YES;') end _p('\t\t\t\tGCC_MODEL_TUNING = G5;') + if #cfg.defines > 0 then + _p('\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (') + _p(table.implode(cfg.defines, "\t\t\t\t", ",\n")) + _p('\t\t\t\t);') + end _p('\t\t\t\tPRODUCT_NAME = %s;', cfg.buildtarget.name) _p('\t\t\t};') _p('\t\t\tname = %s;', cfg.name)