2012-08-13 21:47:32 +04:00
|
|
|
add_custom_command(
|
2006-07-07 00:05:54 +04:00
|
|
|
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/randomResourceFile.plist"
|
|
|
|
COMMAND /bin/cp
|
|
|
|
ARGS "${BundleTest_SOURCE_DIR}/randomResourceFile.plist.in"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/randomResourceFile.plist")
|
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
set_source_files_properties(
|
2006-07-07 00:05:54 +04:00
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/randomResourceFile.plist"
|
|
|
|
PROPERTIES
|
|
|
|
MACOSX_PACKAGE_LOCATION Resources
|
|
|
|
)
|
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
set_source_files_properties(
|
2006-07-07 00:05:54 +04:00
|
|
|
"${BundleTest_SOURCE_DIR}/SomeRandomFile.txt"
|
2014-02-07 22:34:33 +04:00
|
|
|
"${BundleTest_SOURCE_DIR}/../../README.rst"
|
2006-07-07 00:05:54 +04:00
|
|
|
PROPERTIES
|
|
|
|
MACOSX_PACKAGE_LOCATION MacOS
|
|
|
|
)
|
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
add_executable(SecondBundle
|
2006-07-07 00:05:54 +04:00
|
|
|
MACOSX_BUNDLE
|
|
|
|
"${BundleTest_SOURCE_DIR}/BundleTest.cxx"
|
|
|
|
"${BundleTest_SOURCE_DIR}/SomeRandomFile.txt"
|
2014-02-07 22:34:33 +04:00
|
|
|
"${BundleTest_SOURCE_DIR}/../../README.rst"
|
2006-07-07 00:05:54 +04:00
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/randomResourceFile.plist"
|
|
|
|
)
|
2012-08-13 21:47:32 +04:00
|
|
|
target_link_libraries(SecondBundle BundleTestLib)
|
2008-08-27 20:53:19 +04:00
|
|
|
|
2006-07-07 00:05:54 +04:00
|
|
|
# Test bundle installation.
|
2012-08-13 21:47:32 +04:00
|
|
|
install(TARGETS SecondBundle DESTINATION Applications)
|
2006-07-07 00:05:54 +04:00
|
|
|
|
|
|
|
# Test whether bundles respect the output name. Since the library is
|
|
|
|
# installed into a location that uses this output name this will fail if the
|
|
|
|
# bundle does not respect the name. Also the executable will not be found by
|
|
|
|
# the test driver if this does not work.
|
2012-08-13 21:47:32 +04:00
|
|
|
set_target_properties(SecondBundle PROPERTIES OUTPUT_NAME SecondBundleExe)
|