[Cmake-commits] [cmake-commits] david.cole committed BundleIcon.icns NONE 1.1 CMakeLists.txt NONE 1.1 Executable.cxx NONE 1.1 Info.plist NONE 1.1 Library.cxx NONE 1.1 StartupCommand NONE 1.1

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Jul 30 16:36:24 EDT 2008


Update of /cvsroot/CMake/CMake/Tests/BundleGeneratorTest
In directory public:/mounts/ram/cvs-serv22696/Tests/BundleGeneratorTest

Added Files:
	BundleIcon.icns CMakeLists.txt Executable.cxx Info.plist 
	Library.cxx StartupCommand 
Log Message:
ENH: Add test for the new CPack BundleGenerator. Thanks to Tim Shead for the patch. See issue #7170 for more details.


--- NEW FILE: Executable.cxx ---
extern void print_message(const char* const Message);

int main(int argc, char* argv[])
{
  print_message("Howdy, World!\n");
  return 0;
}


--- NEW FILE: BundleIcon.icns ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: Info.plist ---
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
	<dict>
		<key>CFBundleExecutable</key>
		<string>BundleGeneratorTest</string>
		<key>CFBundleIconFile</key>
		<string>BundleGeneratorTest.icns</string>
		<key>CFBundleInfoDictionaryVersion</key>
		<string>6.0</string>
		<key>CFBundlePackageType</key>
		<string>APPL</string>
	</dict>
</plist>

--- NEW FILE: CMakeLists.txt ---
PROJECT(BundleGeneratorTest)

CMAKE_MINIMUM_REQUIRED(VERSION 2.7)

# Build a shared library and install it in lib/
ADD_LIBRARY(Library SHARED Library.cxx)
INSTALL(TARGETS Library DESTINATION lib)

# Build an executable and install it in bin/
ADD_EXECUTABLE(Executable Executable.cxx)
TARGET_LINK_LIBRARIES(Executable Library)
INSTALL(TARGETS Executable DESTINATION bin)

# Use the bundle-generator for packaging ...
SET(CPACK_GENERATOR "Bundle")
SET(CPACK_BUNDLE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/BundleIcon.icns")
SET(CPACK_BUNDLE_NAME "BundleGeneratorTest")
SET(CPACK_BUNDLE_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.plist")
SET(CPACK_BUNDLE_STARTUP_COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/StartupCommand")
SET(CPACK_PACKAGE_DESCRIPTION "Project for testing OSX bundle generation")
SET(CPACK_PACKAGE_NAME "BundleGeneratorTest")
SET(CPACK_PACKAGE_VERSION "0.1")
INCLUDE(CPack)


--- NEW FILE: Library.cxx ---
#include <iostream>

void print_message(const char* const Message)
{
  std::cout << Message;
}


--- NEW FILE: StartupCommand ---
#!/bin/sh

BUNDLE="`echo "$0" | sed -e 's/\/Contents\/MacOS\/.*//'`"
RESOURCES="$BUNDLE/Contents/Resources"

echo "BUNDLE: $BUNDLE"
echo "RESOURCES: $RESOURCES"

export DYLD_LIBRARY_PATH=$RESOURCES/lib

exec "$RESOURCES/bin/Executable"




More information about the Cmake-commits mailing list