CMakeLists.txt 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. project(BundleGeneratorTest)
  2. cmake_minimum_required(VERSION 2.7)
  3. # Build a shared library and install it in lib/
  4. add_library(Library SHARED Library.cxx)
  5. install(TARGETS Library DESTINATION lib)
  6. # Build an executable and install it in bin/
  7. add_executable(Executable Executable.cxx)
  8. target_link_libraries(Executable Library)
  9. install(TARGETS Executable DESTINATION bin)
  10. # Use the bundle-generator for packaging ...
  11. set(CPACK_GENERATOR "Bundle")
  12. set(CPACK_BUNDLE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/BundleIcon.icns")
  13. set(CPACK_BUNDLE_NAME "BundleGeneratorTest")
  14. set(CPACK_BUNDLE_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.plist")
  15. set(CPACK_BUNDLE_STARTUP_COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/StartupCommand")
  16. set(CPACK_PACKAGE_DESCRIPTION "Project for testing OSX bundle generation")
  17. # The custom volume icon is a copy of the normal Mac OSX volume icon, but
  18. # on a white background. This is to differentiate it from the normal one
  19. # so that you can verify that the custom icon is being used by doing a
  20. # visual inspection of the mounted volume... This was added when fixing
  21. # issue #7523...
  22. #
  23. set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/CustomVolumeIcon.icns")
  24. set(CPACK_PACKAGE_NAME "BundleGeneratorTest")
  25. set(CPACK_PACKAGE_VERSION "0.1")
  26. include(CPack)