this repo has no description
1# This file is here to initial Xcode to better default settings.
2
3macro(CONFIGURE_XCODE_DEFAULTS _EXE_NAME)
4
5# This iOS toolchain provides this convenience macro, but this is not in the mainline Mac, so let's define it.
6if(APPLE AND NOT IOS)
7 macro (set_xcode_property TARGET XCODE_PROPERTY XCODE_VALUE)
8 set_property (TARGET ${TARGET} PROPERTY XCODE_ATTRIBUTE_${XCODE_PROPERTY} ${XCODE_VALUE})
9 endmacro (set_xcode_property)
10endif()
11
12
13if(APPLE)
14 if(IOS)
15
16 # We need to make sure dead code stripping is off for "plugins" since we must statically link.
17# set_xcode_property(${_EXE_NAME} DEAD_CODE_STRIPPING "No")
18
19 set_xcode_property(${_EXE_NAME} GCC_GENERATE_DEBUGGING_SYMBOLS[variant=Debug] YES)
20 set_xcode_property(${_EXE_NAME} GCC_GENERATE_DEBUGGING_SYMBOLS[variant=MinSizeRel] YES)
21 set_xcode_property(${_EXE_NAME} GCC_GENERATE_DEBUGGING_SYMBOLS[variant=RelWithDebInfo] YES)
22 set_xcode_property(${_EXE_NAME} GCC_GENERATE_DEBUGGING_SYMBOLS[variant=Release] YES)
23
24 set_xcode_property(${_EXE_NAME} IPHONEOS_DEPLOYMENT_TARGET 5.1)
25 set_xcode_property(${_EXE_NAME} TARGETED_DEVICE_FAMILY "1,2")
26
27 # OSX
28 else()
29 set_xcode_property(${_EXE_NAME} GCC_GENERATE_DEBUGGING_SYMBOLS[variant=Debug] YES)
30 set_xcode_property(${_EXE_NAME} GCC_GENERATE_DEBUGGING_SYMBOLS[variant=MinSizeRel] YES)
31 set_xcode_property(${_EXE_NAME} GCC_GENERATE_DEBUGGING_SYMBOLS[variant=RelWithDebInfo] YES)
32 set_xcode_property(${_EXE_NAME} GCC_GENERATE_DEBUGGING_SYMBOLS[variant=Release] YES)
33
34 set_xcode_property(${_EXE_NAME} MACOSX_DEPLOYMENT_TARGET 10.6)
35
36
37 endif(IOS)
38
39 # Common to both
40 # Use Apple's recommended standard architectures
41 set_xcode_property(${_EXE_NAME} ARCHS "$(ARCHS_STANDARD)")
42
43
44
45 set_xcode_property(${_EXE_NAME} GCC_OPTIMIZATION_LEVEL[variant=Debug] "0")
46 set_xcode_property(${_EXE_NAME} GCC_OPTIMIZATION_LEVEL[variant=MinSizeRel] "s")
47 set_xcode_property(${_EXE_NAME} GCC_OPTIMIZATION_LEVEL[variant=RelWithDebInfo] "s")
48 set_xcode_property(${_EXE_NAME} GCC_OPTIMIZATION_LEVEL[variant=Release] "s")
49
50
51 set_xcode_property(${_EXE_NAME} ONLY_ACTIVE_ARCH NO)
52 set_xcode_property(${_EXE_NAME} DEBUG_INFORMATION_FORMAT "dwarf-with-dsym")
53
54endif(APPLE)
55endmacro(CONFIGURE_XCODE_DEFAULTS)