From e36e5a2680f34c64773944b152e5337f8951a644 Mon Sep 17 00:00:00 2001 From: Gregor Jasny Date: Sat, 18 Jun 2016 22:59:40 +0200 Subject: [PATCH] Xcode: Properly handle BUNDLE_EXTENSION --- Source/cmGlobalXCodeGenerator.cxx | 5 +++++ Tests/CFBundleTest/CMakeLists.txt | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index d30830a46..e82cb16cd 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -1801,6 +1801,11 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, extraLinkOptions += " "; extraLinkOptions += createFlags; } + const char* ext = gtgt->GetProperty("BUNDLE_EXTENSION"); + if (ext) { + buildSettings->AddAttribute("WRAPPER_EXTENSION", + this->CreateString(ext)); + } std::string plist = this->ComputeInfoPListLocation(gtgt); // Xcode will create the final version of Info.plist at build time, // so let it replace the cfbundle name. This avoids creating diff --git a/Tests/CFBundleTest/CMakeLists.txt b/Tests/CFBundleTest/CMakeLists.txt index 5cda527d8..0fe6bb771 100644 --- a/Tests/CFBundleTest/CMakeLists.txt +++ b/Tests/CFBundleTest/CMakeLists.txt @@ -50,7 +50,6 @@ set_source_files_properties( set_target_properties(CFBundleTest PROPERTIES BUNDLE 1 BUNDLE_EXTENSION plugin - XCODE_ATTRIBUTE_WRAPPER_EXTENSION plugin #sets the extension to .plugin XCODE_ATTRIBUTE_MACH_O_TYPE mh_bundle XCODE_ATTRIBUTE_INFOPLIST_FILE ${CMAKE_CURRENT_BINARY_DIR}/Info.plist MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/Info.plist