mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-31 10:50:16 -06:00
Xcode: Add embedded plugins option
This commit is contained in:
@@ -19,6 +19,12 @@ The supported values for ``<type>`` are:
|
||||
The specified items will be added to the ``Embed App Extensions`` build phase.
|
||||
They must be CMake target names.
|
||||
|
||||
``PLUGINS``
|
||||
.. versionadded:: 3.23
|
||||
|
||||
The specified items will be added to the ``Embed PlugIns`` build phase.
|
||||
They must be CMake target names.
|
||||
|
||||
See also :prop_tgt:`XCODE_EMBED_<type>_PATH`,
|
||||
:prop_tgt:`XCODE_EMBED_<type>_REMOVE_HEADERS_ON_COPY` and
|
||||
:prop_tgt:`XCODE_EMBED_<type>_CODE_SIGN_ON_COPY`.
|
||||
|
||||
@@ -14,5 +14,8 @@ The supported values for ``<type>`` are:
|
||||
``APP_EXTENSIONS``
|
||||
.. versionadded:: 3.21
|
||||
|
||||
``PLUGINS``
|
||||
.. versionadded:: 3.23
|
||||
|
||||
If a ``XCODE_EMBED_<type>_CODE_SIGN_ON_COPY`` property is not defined on the
|
||||
target, no code signing on copy will be performed for that ``<type>``.
|
||||
|
||||
@@ -16,3 +16,6 @@ The supported values for ``<type>`` are:
|
||||
|
||||
``APP_EXTENSIONS``
|
||||
.. versionadded:: 3.21
|
||||
|
||||
``PLUGINS``
|
||||
.. versionadded:: 3.23
|
||||
|
||||
@@ -18,3 +18,6 @@ The supported values for ``<type>`` are:
|
||||
|
||||
If the ``XCODE_EMBED_APP_EXTENSIONS_REMOVE_HEADERS_ON_COPY`` property is not
|
||||
defined, headers WILL be removed on copy by default.
|
||||
|
||||
``PLUGINS``
|
||||
.. versionadded:: 3.23
|
||||
|
||||
6
Help/release/dev/xcode-embed-plugins.rst
Normal file
6
Help/release/dev/xcode-embed-plugins.rst
Normal file
@@ -0,0 +1,6 @@
|
||||
xcode-embed-plugins
|
||||
-------------------
|
||||
|
||||
* The :prop_tgt:`XCODE_EMBED_PLUGINS <XCODE_EMBED_<type>>` target property
|
||||
was added to tell the :generator:`Xcode` generator what targets to put in
|
||||
the ``Embed PlugIns`` build phase.
|
||||
@@ -3910,6 +3910,14 @@ void cmGlobalXCodeGenerator::AddEmbeddedFrameworks(cmXCodeObject* target)
|
||||
NoActionOnCopyByDefault);
|
||||
}
|
||||
|
||||
void cmGlobalXCodeGenerator::AddEmbeddedPlugIns(cmXCodeObject* target)
|
||||
{
|
||||
static const auto dstSubfolderSpec = "13";
|
||||
|
||||
this->AddEmbeddedObjects(target, "Embed PlugIns", "XCODE_EMBED_PLUGINS",
|
||||
dstSubfolderSpec, NoActionOnCopyByDefault);
|
||||
}
|
||||
|
||||
void cmGlobalXCodeGenerator::AddEmbeddedAppExtensions(cmXCodeObject* target)
|
||||
{
|
||||
static const auto dstSubfolderSpec = "13";
|
||||
@@ -4298,6 +4306,7 @@ bool cmGlobalXCodeGenerator::CreateXCodeObjects(
|
||||
for (auto t : targets) {
|
||||
this->AddDependAndLinkInformation(t);
|
||||
this->AddEmbeddedFrameworks(t);
|
||||
this->AddEmbeddedPlugIns(t);
|
||||
this->AddEmbeddedAppExtensions(t);
|
||||
// Inherit project-wide values for any target-specific search paths.
|
||||
this->InheritBuildSettingAttribute(t, "HEADER_SEARCH_PATHS");
|
||||
|
||||
@@ -216,6 +216,7 @@ private:
|
||||
const std::string& dstSubfolderSpec,
|
||||
int actionsOnByDefault);
|
||||
void AddEmbeddedFrameworks(cmXCodeObject* target);
|
||||
void AddEmbeddedPlugIns(cmXCodeObject* target);
|
||||
void AddEmbeddedAppExtensions(cmXCodeObject* target);
|
||||
void AddPositionIndependentLinkAttribute(cmGeneratorTarget* target,
|
||||
cmXCodeObject* buildSettings,
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/findAttribute.cmake)
|
||||
|
||||
findAttribute(${test} "RemoveHeadersOnCopy" TRUE)
|
||||
findAttribute(${test} "CodeSignOnCopy" FALSE)
|
||||
@@ -0,0 +1 @@
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/EmbedPlugIns.cmake)
|
||||
20
Tests/RunCMake/XcodeProject-Embed/EmbedPlugIns.cmake
Normal file
20
Tests/RunCMake/XcodeProject-Embed/EmbedPlugIns.cmake
Normal file
@@ -0,0 +1,20 @@
|
||||
add_executable(plug_in MACOS_BUNDLE Empty.txt)
|
||||
set_target_properties(plug_in PROPERTIES
|
||||
LINKER_LANGUAGE CXX
|
||||
XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "NO"
|
||||
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY ""
|
||||
XCODE_ATTRIBUTE_ENABLE_BITCODE "NO"
|
||||
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in"
|
||||
MACOSX_BUNDLE_GUI_IDENTIFIER "com.example.app.plug_in"
|
||||
XCODE_EXPLICIT_FILE_TYPE "wrapper.cfbundle"
|
||||
XCODE_ATTRIBUTE_MACH_O_TYPE "mh_bundle"
|
||||
)
|
||||
|
||||
add_executable(app MACOSX_BUNDLE main.m)
|
||||
add_dependencies(app plug_in)
|
||||
set_target_properties(app PROPERTIES
|
||||
XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "NO"
|
||||
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY ""
|
||||
XCODE_EMBED_PLUGINS plug_in
|
||||
MACOSX_BUNDLE_GUI_IDENTIFIER "com.example.app"
|
||||
)
|
||||
Reference in New Issue
Block a user