@@ -33,16 +33,16 @@ Reference
33
33
34
34
.. automethod :: XcodeBuild.build
35
35
36
- The ``Xcode .build() `` method internally implements a call to ``xcodebuild `` like:
36
+ The ``XcodeBuild .build() `` method internally implements a call to ``xcodebuild `` like:
37
37
38
38
.. code :: bash
39
39
40
- $ xcodebuild -project app.xcodeproj -configuration < configuration> -arch < architecture> < sdk> < verbosity> -target < target> /-alltargets * _DEPLOYMENT_TARGET=settings.os.version
40
+ $ xcodebuild -project app.xcodeproj -configuration < configuration> -arch < architecture> < sdk> < verbosity> -target < target> /-alltargets * _DEPLOYMENT_TARGET=settings.os.version < cli_args >
41
41
42
42
Where:
43
43
44
44
- ``configuration `` is the configuration, typically *Release * or *Debug *, which will be obtained
45
- from ``settings.build_type ``.
45
+ from ``settings.build_type `` unless you pass it explicitly via the `` configuration `` parameter .
46
46
- ``architecture `` is the build architecture, a mapping from the ``settings.arch `` to the
47
47
common architectures defined by Apple 'i386', 'x86_64', 'armv7', 'arm64', etc.
48
48
- ``sdk `` is set based on the values of the ``os.sdk `` and ``os.sdk_version `` defining the
@@ -54,10 +54,21 @@ Where:
54
54
``os.sdk_version `` settings values.
55
55
- ``verbosity `` is the verbosity level for the build and can take value 'verbose' or
56
56
'quiet' if set by ``tools.build:verbosity `` in your **[conf] **
57
-
58
- Additional parameters that are passed to ``xcodebuild ``:
59
-
60
- - deployment target setting according to the values of ``os `` and ``os.version `` from profile,
57
+ - ``cli_args `` are the additional command line arguments passed via the
58
+ ``cli_args `` parameter. These can include custom build settings like
59
+ ``BUILD_LIBRARY_FOR_DISTRIBUTION=YES ``. You can also redirect build artifacts
60
+ to the Conan build folder by passing ``SYMROOT `` and ``OBJROOT `` settings:
61
+
62
+ .. code :: python
63
+
64
+ def build (self ):
65
+ xcodebuild = XcodeBuild(self )
66
+ xcodebuild.build(" app.xcodeproj" , cli_args = [f " SYMROOT= { self .build_folder} " ,
67
+ f " OBJROOT= { self .build_folder} " ])
68
+
69
+ Additional parameters that are passed to ``xcodebuild `` (but before ``cli_args ``):
70
+
71
+ - Deployment target setting according to the values of ``os `` and ``os.version `` from profile,
61
72
e.g. ``MACOSX_DEPLOYMENT_TARGET=10.15 `` or ``IPHONEOS_DEPLOYMENT_TARGET=15.0 ``
62
73
63
74
conf
0 commit comments