summaryrefslogtreecommitdiff
path: root/cmake/configure-packaging.cmake
blob: 9a64969192b91ed2d8404a8e912621e9fb0b6560 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
set(CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY 0)
set(CPACK_COMPONENTS_ALL "${CPACK_PACKAGE_NAME}")

if (CPACK_GENERATOR STREQUAL "External")
  list(APPEND CPACK_COMPONENTS_ALL "extractor" "appimage")
endif()

if(CPACK_GENERATOR MATCHES "DEB|RPM")
  set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/ship/bin")
elseif(CPACK_GENERATOR MATCHES "ZIP")
  set(CPACK_PACKAGING_INSTALL_PREFIX "")
endif()

if(CPACK_GENERATOR MATCHES "External")
  set(CPACK_MONOLITHIC_INSTALL ON)
  set(CPACK_PACKAGING_INSTALL_PREFIX "/usr/bin")
endif()

if (CPACK_GENERATOR MATCHES "Bundle")
    set(CPACK_BUNDLE_NAME "SpaghettiKart")
    set(CPACK_BUNDLE_PLIST "macosx/Info.plist")
    set(CPACK_BUNDLE_ICON "macosx/SpaghettiKart.icns")
    # set(CPACK_BUNDLE_STARTUP_COMMAND "macosx/SpaghettiKart-macos.sh")
    set(CPACK_BUNDLE_APPLE_CERT_APP "-")
endif()