This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, next has been updated discards ab31b34c7f87f2703299f0e5af1fb3cec9fa39b5 (commit) discards 835c6bc8f1bfdc0258a56bfb45b629119ff49bea (commit) discards b95ba9c47daae0f77c06a2e993e342cb74de5ce3 (commit) discards d9bebefbde3ce2ff1589de401b916b9d62dd6ca9 (commit) discards 1e2081a40b4e468ae21814d58a5a67e764830dde (commit) via 08b2a3a2ca83d8249b433708b7bb6982d04d7bb4 (commit) via 7b0663973bba18c5e532464261f9ec404f9ebaaf (commit) via 304e6a832e47a384552a3adbc49d7d68d65c2dd9 (commit) via b5189fda244112f47e71c820bf1498d500026cd0 (commit) via c51c2cfac619ac9efb9829f8b4decf9756891609 (commit) This update added new revisions after undoing existing revisions. That is to say, the old revision is not a strict subset of the new revision. This situation occurs when you --force push a change and generate a repository containing something like this: * -- * -- B -- O -- O -- O (ab31b34c7f87f2703299f0e5af1fb3cec9fa39b5) \ N -- N -- N (08b2a3a2ca83d8249b433708b7bb6982d04d7bb4) When this happens we assume that you've already had alert emails for all of the O revisions, and so we here report only the revisions in the N branch from the common base, B. Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=08b2a3a2ca83d8249b433708b7bb6982d04d7bb4 commit 08b2a3a2ca83d8249b433708b7bb6982d04d7bb4 Merge: 7b06639 b5189fd Author: Gregor Jasny <gja...@googlemail.com> AuthorDate: Thu Mar 23 15:44:56 2017 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Thu Mar 23 11:44:59 2017 -0400 Stage topic '16680-ios-bundle-resources' Topic-id: 23205 Topic-url: https://gitlab.kitware.com/cmake/cmake/merge_requests/613 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7b0663973bba18c5e532464261f9ec404f9ebaaf commit 7b0663973bba18c5e532464261f9ec404f9ebaaf Merge: 304e6a8 d40fc88 Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Mar 23 14:52:14 2017 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Thu Mar 23 11:44:12 2017 -0400 Stage topic 'make_sure_cuda_tests_run' Topic-id: 23212 Topic-url: https://gitlab.kitware.com/cmake/cmake/merge_requests/615 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=304e6a832e47a384552a3adbc49d7d68d65c2dd9 commit 304e6a832e47a384552a3adbc49d7d68d65c2dd9 Merge: f0f60c5 d4a693a Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Mar 23 14:48:05 2017 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Thu Mar 23 11:44:11 2017 -0400 Stage topic 'InstallRequiredSystemLibraries-vs2017' Topic-id: 23213 Topic-url: https://gitlab.kitware.com/cmake/cmake/merge_requests/616 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b5189fda244112f47e71c820bf1498d500026cd0 commit b5189fda244112f47e71c820bf1498d500026cd0 Author: Gregor Jasny <gja...@googlemail.com> AuthorDate: Wed Mar 22 23:10:28 2017 +0100 Commit: Gregor Jasny <gja...@googlemail.com> CommitDate: Thu Mar 23 16:43:55 2017 +0100 Apple: Add test for bundle resource layout Closes: #16680 diff --git a/Tests/RunCMake/Framework/FrameworkLayout.cmake b/Tests/RunCMake/Framework/FrameworkLayout.cmake index ae32134..dcfbd2d 100644 --- a/Tests/RunCMake/Framework/FrameworkLayout.cmake +++ b/Tests/RunCMake/Framework/FrameworkLayout.cmake @@ -4,11 +4,17 @@ enable_language(C) add_library(Framework ${FRAMEWORK_TYPE} foo.c foo.h - res.txt) + res.txt + flatresource.txt + deepresource.txt + some.txt) set_target_properties(Framework PROPERTIES FRAMEWORK TRUE PUBLIC_HEADER foo.h RESOURCE "res.txt") +set_source_files_properties(flatresource.txt PROPERTIES MACOSX_PACKAGE_LOCATION Resources) +set_source_files_properties(deepresource.txt PROPERTIES MACOSX_PACKAGE_LOCATION Resources/deep) +set_source_files_properties(some.txt PROPERTIES MACOSX_PACKAGE_LOCATION somedir) add_custom_command(TARGET Framework POST_BUILD COMMAND /usr/bin/file $<TARGET_FILE:Framework>) diff --git a/Tests/RunCMake/Framework/OSXFrameworkLayout-build-check.cmake b/Tests/RunCMake/Framework/OSXFrameworkLayout-build-check.cmake index da1ccb4..1a543d8 100644 --- a/Tests/RunCMake/Framework/OSXFrameworkLayout-build-check.cmake +++ b/Tests/RunCMake/Framework/OSXFrameworkLayout-build-check.cmake @@ -1,8 +1,11 @@ set(framework-dir "${RunCMake_TEST_BINARY_DIR}/Framework.framework") set(framework-resources "${framework-dir}/Resources") set(framework-resource-file "${framework-resources}/res.txt") +set(framework-flat-resource-file "${framework-resources}/flatresource.txt") +set(framework-deep-resource-file "${framework-resources}/deep/deepresource.txt") set(framework-library "${framework-dir}/Framework") set(framework-versions "${framework-dir}/Versions") +set(framework-some-file "${framework-versions}/Current/somedir/some.txt") set(plist-file "${framework-resources}/Info.plist") set(framework-header "${framework-dir}/Headers/foo.h") @@ -22,6 +25,18 @@ if(NOT EXISTS ${framework-resource-file}) message(SEND_ERROR "Framework resource file not found at ${framework-resource-file}") endif() +if(NOT EXISTS ${framework-flat-resource-file}) + message(SEND_ERROR "Framework flat resource file not found at ${framework-flat-resource-file}") +endif() + +if(NOT EXISTS ${framework-deep-resource-file}) + message(SEND_ERROR "Framework deep resource file not found at ${framework-deep-resource-file}") +endif() + +if(NOT EXISTS ${framework-some-file}) + message(SEND_ERROR "Framework some file not found at ${framework-some-file}") +endif() + if(NOT EXISTS ${framework-versions}) message(SEND_ERROR "Framework versions not found at ${framework-versions}") endif() diff --git a/Tests/RunCMake/Framework/deepresource.txt b/Tests/RunCMake/Framework/deepresource.txt new file mode 100644 index 0000000..e69de29 diff --git a/Tests/RunCMake/Framework/flatresource.txt b/Tests/RunCMake/Framework/flatresource.txt new file mode 100644 index 0000000..e69de29 diff --git a/Tests/RunCMake/Framework/iOSFrameworkLayout-build-check.cmake b/Tests/RunCMake/Framework/iOSFrameworkLayout-build-check.cmake index b81a5f7..e068a3a 100644 --- a/Tests/RunCMake/Framework/iOSFrameworkLayout-build-check.cmake +++ b/Tests/RunCMake/Framework/iOSFrameworkLayout-build-check.cmake @@ -1,6 +1,9 @@ set(framework-dir "${RunCMake_TEST_BINARY_DIR}/Framework.framework") set(framework-resources "${framework-dir}/Resources") set(framework-resource-file "${framework-dir}/res.txt") +set(framework-flat-resource-file "${framework-dir}/flatresource.txt") +set(framework-deep-resource-file "${framework-dir}/deep/deepresource.txt") +set(framework-some-file "${framework-dir}/somedir/some.txt") set(framework-library "${framework-dir}/Framework") set(framework-versions "${framework-dir}/Versions") set(plist-file "${framework-dir}/Info.plist") @@ -22,6 +25,18 @@ if(NOT EXISTS ${framework-resource-file}) message(SEND_ERROR "Framework resource file not found at ${framework-resource-file}") endif() +if(NOT EXISTS ${framework-flat-resource-file}) + message(SEND_ERROR "Framework flat resource file not found at ${framework-flat-resource-file}") +endif() + +if(NOT EXISTS ${framework-deep-resource-file}) + message(SEND_ERROR "Framework deep resource file not found at ${framework-deep-resource-file}") +endif() + +if(NOT EXISTS ${framework-some-file}) + message(SEND_ERROR "Framework some file not found at ${framework-some-file}") +endif() + if(EXISTS ${framework-versions}) message(SEND_ERROR "Framework versions found at ${framework-versions}") endif() diff --git a/Tests/RunCMake/Framework/some.txt b/Tests/RunCMake/Framework/some.txt new file mode 100644 index 0000000..e69de29 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c51c2cfac619ac9efb9829f8b4decf9756891609 commit c51c2cfac619ac9efb9829f8b4decf9756891609 Author: Gregor Jasny <gja...@googlemail.com> AuthorDate: Wed Mar 22 22:49:38 2017 +0100 Commit: Gregor Jasny <gja...@googlemail.com> CommitDate: Thu Mar 23 16:43:55 2017 +0100 Apple: Fix Resources location for all generators Issue: #16680 diff --git a/Help/prop_sf/MACOSX_PACKAGE_LOCATION.rst b/Help/prop_sf/MACOSX_PACKAGE_LOCATION.rst index 69cdcb7..a064afa 100644 --- a/Help/prop_sf/MACOSX_PACKAGE_LOCATION.rst +++ b/Help/prop_sf/MACOSX_PACKAGE_LOCATION.rst @@ -21,3 +21,10 @@ extension is changed). See the :prop_tgt:`PUBLIC_HEADER`, :prop_tgt:`PRIVATE_HEADER`, and :prop_tgt:`RESOURCE` target properties for specifying files meant for ``Headers``, ``PrivateHeaders``, or ``Resources`` directories. + +If the specified location is equal to ``Resources``, the resulting location +will be the same as if the :prop_tgt:`RESOURCE` property had been used. If +the specified location is a sub-folder of ``Resources``, it will be placed +into the respective sub-folder. Note: For iOS Apple uses a flat bundle layout +where no ``Resources`` folder exist. Therefore CMake strips the ``Resources`` +folder name from the specified location. diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 64b05c3..f78a933 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -3315,10 +3315,18 @@ cmGeneratorTarget::GetTargetSourceFileFlags(const cmSourceFile* sf) const // were not listed in one of the other lists. if (const char* location = sf->GetProperty("MACOSX_PACKAGE_LOCATION")) { flags.MacFolder = location; + const bool stripResources = + this->GlobalGenerator->ShouldStripResourcePath(this->Makefile); if (strcmp(location, "Resources") == 0) { flags.Type = cmGeneratorTarget::SourceFileTypeResource; + if (stripResources) { + flags.MacFolder = ""; + } } else if (cmSystemTools::StringStartsWith(location, "Resources/")) { flags.Type = cmGeneratorTarget::SourceFileTypeDeepResource; + if (stripResources) { + flags.MacFolder += strlen("Resources/"); + } } else { flags.Type = cmGeneratorTarget::SourceFileTypeMacContent; } @@ -3372,7 +3380,7 @@ void cmGeneratorTarget::ConstructSourceFileFlags() const if (cmSourceFile* sf = this->Makefile->GetSource(*it)) { SourceFileFlags& flags = this->SourceFlagsMap[sf]; flags.MacFolder = ""; - if (!this->Makefile->PlatformIsAppleIos()) { + if (!this->GlobalGenerator->ShouldStripResourcePath(this->Makefile)) { flags.MacFolder = "Resources"; } flags.Type = cmGeneratorTarget::SourceFileTypeResource; diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 0d53bf7..851290a 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -2487,6 +2487,11 @@ std::string cmGlobalGenerator::GenerateRuleFile( return ruleFile; } +bool cmGlobalGenerator::ShouldStripResourcePath(cmMakefile* mf) const +{ + return mf->PlatformIsAppleIos(); +} + std::string cmGlobalGenerator::GetSharedLibFlagsForLanguage( std::string const& l) const { diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index b3cb41f..2558fee 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -337,6 +337,10 @@ public: relevant for mixed macOS and iOS builds. */ virtual bool UseEffectivePlatformName(cmMakefile*) const { return false; } + /** Return whether the "Resources" folder prefix should be stripped from + MacFolder. */ + virtual bool ShouldStripResourcePath(cmMakefile*) const; + std::string GetSharedLibFlagsForLanguage(std::string const& lang) const; /** Generate an <output>.rule file path for a given command output. */ diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index bd0f55b..39f7b8f 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -1200,9 +1200,8 @@ bool cmGlobalXCodeGenerator::CreateXCodeTargets( this->CreateString("2147483647")); copyFilesBuildPhase->AddAttribute("dstSubfolderSpec", this->CreateString("7")); - const std::string dstPath = mit->first.substr(strlen("Resources/")); copyFilesBuildPhase->AddAttribute("dstPath", - this->CreateString(dstPath)); + this->CreateString(mit->first)); copyFilesBuildPhase->AddAttribute("runOnlyForDeploymentPostprocessing", this->CreateString("0")); buildFiles = this->CreateObject(cmXCodeObject::OBJECT_LIST); @@ -3701,6 +3700,12 @@ bool cmGlobalXCodeGenerator::UseEffectivePlatformName(cmMakefile* mf) const return cmSystemTools::IsOn(epnValue); } +bool cmGlobalXCodeGenerator::ShouldStripResourcePath(cmMakefile*) const +{ + // Xcode determines Resource location itself + return true; +} + void cmGlobalXCodeGenerator::ComputeTargetObjectDirectory( cmGeneratorTarget* gt) const { diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h index 9eacdef..172e414 100644 --- a/Source/cmGlobalXCodeGenerator.h +++ b/Source/cmGlobalXCodeGenerator.h @@ -88,6 +88,8 @@ public: bool UseEffectivePlatformName(cmMakefile* mf) const CM_OVERRIDE; + bool ShouldStripResourcePath(cmMakefile*) const CM_OVERRIDE; + bool SetGeneratorToolset(std::string const& ts, cmMakefile* mf) CM_OVERRIDE; void AppendFlag(std::string& flags, std::string const& flag); ----------------------------------------------------------------------- Summary of changes: Source/cmGeneratorTarget.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits