Path: blob/master/Tests/BundleTest/BundleSubDir/CMakeLists.txt
3153 views
project(BundleSubDir)12add_custom_command(3OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/randomResourceFile.plist"4COMMAND /bin/cp5ARGS "${BundleTest_SOURCE_DIR}/randomResourceFile.plist.in"6"${CMAKE_CURRENT_BINARY_DIR}/randomResourceFile.plist")78set_source_files_properties(9"${CMAKE_CURRENT_BINARY_DIR}/randomResourceFile.plist"10PROPERTIES11MACOSX_PACKAGE_LOCATION Resources12)1314set_source_files_properties(15"${BundleTest_SOURCE_DIR}/SomeRandomFile.txt"16"${BundleTest_SOURCE_DIR}/../../README.rst"17PROPERTIES18MACOSX_PACKAGE_LOCATION Other19)2021add_executable(SecondBundle22MACOSX_BUNDLE23"${BundleTest_SOURCE_DIR}/BundleTest.cxx"24"${BundleTest_SOURCE_DIR}/SomeRandomFile.txt"25"${BundleTest_SOURCE_DIR}/../../README.rst"26"${CMAKE_CURRENT_BINARY_DIR}/randomResourceFile.plist"27)28target_link_libraries(SecondBundle BundleTestLib)2930# Test bundle installation.31install(TARGETS SecondBundle DESTINATION Applications)3233# Test whether bundles respect the output name. Since the library is34# installed into a location that uses this output name this will fail if the35# bundle does not respect the name. Also the executable will not be found by36# the test driver if this does not work.37set_target_properties(SecondBundle PROPERTIES OUTPUT_NAME SecondBundleExe)3839# Express one app bundle in terms of another's SOURCES to verify that40# the generators do not expose the Info.plist of one to the other.41add_executable(SubdirBundle1 MACOSX_BUNDLE EXCLUDE_FROM_ALL ../BundleTest.cxx)42add_executable(SubdirBundle2 MACOSX_BUNDLE EXCLUDE_FROM_ALL $<TARGET_PROPERTY:SubdirBundle1,SOURCES>)434445