summaryrefslogtreecommitdiffstats
path: root/Tests/BundleTest/CMakeLists.txt
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2006-03-28 13:54:01 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2006-03-28 13:54:01 (GMT)
commit40272a16bd99b2a099cb3ef910f6d70c7c3a6f65 (patch)
tree3834eae44422f7342369ae285f2daa99e66eb0bc /Tests/BundleTest/CMakeLists.txt
parent5d722df21f76087d80603b1df3a6be628c3e1693 (diff)
downloadCMake-40272a16bd99b2a099cb3ef910f6d70c7c3a6f65.zip
CMake-40272a16bd99b2a099cb3ef910f6d70c7c3a6f65.tar.gz
CMake-40272a16bd99b2a099cb3ef910f6d70c7c3a6f65.tar.bz2
ENH: Add support for adding content to bundles
Diffstat (limited to 'Tests/BundleTest/CMakeLists.txt')
-rw-r--r--Tests/BundleTest/CMakeLists.txt29
1 files changed, 28 insertions, 1 deletions
diff --git a/Tests/BundleTest/CMakeLists.txt b/Tests/BundleTest/CMakeLists.txt
index 9e8cb20..1e90566 100644
--- a/Tests/BundleTest/CMakeLists.txt
+++ b/Tests/BundleTest/CMakeLists.txt
@@ -1,9 +1,36 @@
PROJECT(BundleTest)
SET(MACOSX_BUNDLE_INFO_STRING "bundle_info_string")
+SET(CMAKE_MacOSX_Content_COMPILE_OBJECT "\"${CMAKE_COMMAND}\" -E copy_if_different <SOURCE> <OBJECT>")
+
+ADD_CUSTOM_COMMAND(
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/randomResourceFile.plist"
+ COMMAND /bin/cp
+ ARGS "${CMAKE_CURRENT_SOURCE_DIR}/randomResourceFile.plist.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/randomResourceFile.plist")
+
+SET_SOURCE_FILES_PROPERTIES(
+ "${CMAKE_CURRENT_BINARY_DIR}/randomResourceFile.plist"
+ PROPERTIES
+ MACOSX_PACKAGE_LOCATION Resources
+ )
+
+SET_SOURCE_FILES_PROPERTIES(
+ SomeRandomFile.txt
+ PROPERTIES
+ MACOSX_PACKAGE_LOCATION MacOS
+ )
+
+SET(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}/foobar")
# Test building a bundle linking to a shared library.
ADD_LIBRARY(BundleTestLib SHARED BundleLib.cxx)
-ADD_EXECUTABLE(BundleTest MACOSX_BUNDLE BundleTest.cxx)
+ADD_EXECUTABLE(BundleTest
+ MACOSX_BUNDLE
+ BundleTest.cxx
+ SomeRandomFile.txt
+ "${CMAKE_CURRENT_BINARY_DIR}/randomResourceFile.plist"
+ )
+
TARGET_LINK_LIBRARIES(BundleTest BundleTestLib)
# Test bundle installation.