CMakeLists.txt 1.1 KB

1234567891011121314151617181920212223242526
  1. PROJECT(BundleTest)
  2. SET(MACOSX_BUNDLE_INFO_STRING "bundle_info_string")
  3. # Test building a bundle linking to a shared library.
  4. ADD_LIBRARY(BundleTestLib SHARED BundleLib.cxx)
  5. ADD_EXECUTABLE(BundleTest MACOSX_BUNDLE BundleTest.cxx)
  6. TARGET_LINK_LIBRARIES(BundleTest BundleTestLib)
  7. # Test bundle installation.
  8. INSTALL(TARGETS BundleTestLib DESTINATION Application/BundleTestExe.app/Contents/Plugins)
  9. INSTALL(TARGETS BundleTest DESTINATION Application)
  10. # Test whether bundles respect the output name. Since the library is
  11. # installed into a location that uses this output name this will fail if the
  12. # bundle does not respect the name. Also the executable will not be found by
  13. # the test driver if this does not work.
  14. SET_TARGET_PROPERTIES(BundleTest PROPERTIES OUTPUT_NAME BundleTestExe)
  15. # Test executable versioning if it is supported.
  16. IF(NOT XCODE)
  17. SET_TARGET_PROPERTIES(BundleTest PROPERTIES VERSION 1)
  18. ENDIF(NOT XCODE)
  19. # Make sure the executable can find its installed library.
  20. SET_TARGET_PROPERTIES(BundleTestLib PROPERTIES
  21. INSTALL_NAME_DIR "@executable_path/../Plugins")