summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/Framework
diff options
context:
space:
mode:
authorGregor Jasny <gjasny@googlemail.com>2017-03-22 22:10:28 (GMT)
committerGregor Jasny <gjasny@googlemail.com>2017-03-23 15:43:55 (GMT)
commitb5189fda244112f47e71c820bf1498d500026cd0 (patch)
treeb635eb775b2cdfc544326fff8e1282963a9f49fb /Tests/RunCMake/Framework
parentc51c2cfac619ac9efb9829f8b4decf9756891609 (diff)
downloadCMake-b5189fda244112f47e71c820bf1498d500026cd0.zip
CMake-b5189fda244112f47e71c820bf1498d500026cd0.tar.gz
CMake-b5189fda244112f47e71c820bf1498d500026cd0.tar.bz2
Apple: Add test for bundle resource layout
Closes: #16680
Diffstat (limited to 'Tests/RunCMake/Framework')
-rw-r--r--Tests/RunCMake/Framework/FrameworkLayout.cmake8
-rw-r--r--Tests/RunCMake/Framework/OSXFrameworkLayout-build-check.cmake15
-rw-r--r--Tests/RunCMake/Framework/deepresource.txt0
-rw-r--r--Tests/RunCMake/Framework/flatresource.txt0
-rw-r--r--Tests/RunCMake/Framework/iOSFrameworkLayout-build-check.cmake15
-rw-r--r--Tests/RunCMake/Framework/some.txt0
6 files changed, 37 insertions, 1 deletions
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
--- /dev/null
+++ b/Tests/RunCMake/Framework/deepresource.txt
diff --git a/Tests/RunCMake/Framework/flatresource.txt b/Tests/RunCMake/Framework/flatresource.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/Framework/flatresource.txt
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
--- /dev/null
+++ b/Tests/RunCMake/Framework/some.txt