2005-07-13 23:43:40 +04:00
|
|
|
PROJECT(BundleTest)
|
|
|
|
SET(MACOSX_BUNDLE_INFO_STRING "bundle_info_string")
|
2006-03-03 20:58:48 +03:00
|
|
|
|
|
|
|
# Test building a bundle linking to a shared library.
|
|
|
|
ADD_LIBRARY(BundleTestLib SHARED BundleLib.cxx)
|
2005-07-13 23:43:40 +04:00
|
|
|
ADD_EXECUTABLE(BundleTest MACOSX_BUNDLE BundleTest.cxx)
|
2006-03-03 20:58:48 +03:00
|
|
|
TARGET_LINK_LIBRARIES(BundleTest BundleTestLib)
|
|
|
|
|
|
|
|
# Test bundle installation.
|
|
|
|
INSTALL(TARGETS BundleTestLib DESTINATION Application/BundleTestExe.app/Contents/Plugins)
|
|
|
|
INSTALL(TARGETS BundleTest DESTINATION Application)
|
|
|
|
|
|
|
|
# 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.
|
|
|
|
SET_TARGET_PROPERTIES(BundleTest PROPERTIES OUTPUT_NAME BundleTestExe)
|
|
|
|
|
|
|
|
# Test executable versioning if it is supported.
|
|
|
|
IF(NOT XCODE)
|
|
|
|
SET_TARGET_PROPERTIES(BundleTest PROPERTIES VERSION 1)
|
|
|
|
ENDIF(NOT XCODE)
|
2005-07-13 23:43:40 +04:00
|
|
|
|
2006-03-03 20:58:48 +03:00
|
|
|
# Make sure the executable can find its installed library.
|
|
|
|
SET_TARGET_PROPERTIES(BundleTestLib PROPERTIES
|
|
|
|
INSTALL_NAME_DIR "@executable_path/../Plugins")
|
2006-03-10 18:12:26 +03:00
|
|
|
|
|
|
|
INCLUDE(CPack)
|
|
|
|
|