XCODE_EMBED_<type>¶
Добавлено в версии 3.20.
Tell the Xcode generator to embed the specified list of items into
the target bundle. <type> specifies the embed build phase to use.
See the Xcode documentation for the base location of each <type>.
The supported values for <type> are:
FRAMEWORKSThe specified items will be added to the
Embed Frameworksbuild phase. The items can be CMake target names or paths to frameworks or libraries.APP_EXTENSIONSДобавлено в версии 3.21.
The specified items will be added to the
Embed App Extensionsbuild phase, withDestinationset toPlugIns and Foundation ExtensionsThey must be CMake target names.EXTENSIONKIT_EXTENSIONSДобавлено в версии 3.26.
The specified items will be added to the
Embed App Extensionsbuild phase, withDestinationset toExtensionKit ExtensionsThey must be CMake target names, and should likely have theXCODE_PRODUCT_TYPEtarget property set tocom.apple.product-type.extensionkit-extensionas well as theXCODE_EXPLICIT_FILE_TYPEtowrapper.extensionkit-extensionPLUGINSДобавлено в версии 3.23.
The specified items will be added to the
Embed PlugInsbuild phase. They must be CMake target names.RESOURCESДобавлено в версии 3.28.
The specified items will be added to the
Embed Resourcesbuild phase. They must be CMake target names or folder paths.XPC_SERVICESДобавлено в версии 3.29.
The specified items will be added to the
Embed XPC Servicesbuild phase. They must be CMake target names.
When listing a target as any of the things to embed, Xcode must see that target as part of the same Xcode project, or a sub-project of the one defining the bundle. In order to satisfy this constraint, the CMake project must ensure at least one of the following:
The
CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLYvariable is set to true in the top levelCMakeLists.txtfile. This is the simplest and most robust approach.Define the target-to-embed in a subdirectory of the one that defines the target being embedded into.
If the target-to-embed and the target being embedded into are in separate, unrelated directories (i.e. they are siblings, not one a parent of the other), ensure they have a common
project()call in a parent directory and no otherproject()calls between themselves and that commonproject()call.
See also XCODE_EMBED_<type>_PATH,
XCODE_EMBED_<type>_REMOVE_HEADERS_ON_COPY and
XCODE_EMBED_<type>_CODE_SIGN_ON_COPY.