Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Kitware
GitHub Repository: Kitware/CMake
Path: blob/master/Tests/BundleGeneratorTest/CMakeLists.txt
3150 views
1
cmake_minimum_required(VERSION 3.10)
2
project(BundleGeneratorTest)
3
4
# Build a shared library and install it in lib/
5
add_library(Library SHARED Library.cxx)
6
install(TARGETS Library DESTINATION lib)
7
8
# Build an executable and install it in bin/
9
add_executable(Executable Executable.cxx)
10
target_link_libraries(Executable Library)
11
install(TARGETS Executable DESTINATION bin)
12
13
# Use the bundle-generator for packaging ...
14
set(CPACK_GENERATOR "Bundle")
15
set(CPACK_BUNDLE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/BundleIcon.icns")
16
set(CPACK_BUNDLE_NAME "BundleGeneratorTest")
17
set(CPACK_BUNDLE_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.plist")
18
set(CPACK_BUNDLE_STARTUP_COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/StartupCommand")
19
set(CPACK_PACKAGE_DESCRIPTION "Project for testing OSX bundle generation")
20
21
# The custom volume icon is a copy of the normal Mac OSX volume icon, but
22
# on a white background. This is to differentiate it from the normal one
23
# so that you can verify that the custom icon is being used by doing a
24
# visual inspection of the mounted volume... This was added when fixing
25
# issue #7523...
26
#
27
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/CustomVolumeIcon.icns")
28
29
set(CPACK_PACKAGE_NAME "BundleGeneratorTest")
30
set(CPACK_PACKAGE_VERSION "0.1")
31
32
include(CPack)
33
34