2010-07-03 15:54:26 +02:00
##########################################################################################
# Settings that are common to all target systems.
2020-04-20 04:34:33 +02:00
IF ( ${ CMAKE_SYSTEM_NAME } MATCHES "Windows" )
SET ( CPACK_SYSTEM_NAME "win32" )
ELSEIF ( ${ CMAKE_SYSTEM_NAME } MATCHES "Darwin" )
SET ( CPACK_SYSTEM_NAME "macos" )
ELSE ( )
SET ( CPACK_SYSTEM_NAME ${ CMAKE_SYSTEM_NAME } )
ENDIF ( )
2010-09-16 23:46:02 +02:00
SET ( INTERNAL_NAME "speed-dreams" )
2010-07-03 15:54:26 +02:00
SET ( CPACK_PACKAGE_NAME "Speed Dreams" )
2022-07-19 01:55:34 +02:00
SET ( CPACK_PACKAGE_VENDOR "The Speed Dreams team" )
2022-10-19 16:50:20 +02:00
SET ( CPACK_PACKAGE_CONTACT "https://sourceforge.net/projects/speed-dreams/" )
2010-07-03 15:54:26 +02:00
SET ( CPACK_PACKAGE_DESCRIPTION_SUMMARY "Speed Dreams (an Open Motorsport Sim) is a racing simulation that allows you to drive in races against opponents simulated by the computer ; it is GPL 2+ and has been forked from TORCS in late 2008" )
2010-09-28 21:51:45 +02:00
SET ( CPACK_RESOURCE_FILE_LICENSE "${SOURCE_DIR}/COPYING.txt" )
SET ( CPACK_RESOURCE_FILE_README "${SOURCE_DIR}/README.txt" )
2010-02-28 10:04:35 +01:00
2019-01-06 07:43:09 +01:00
SET ( EXECUTABLE_NAME "${INTERNAL_NAME}-2" )
2010-07-10 21:21:13 +02:00
SET ( CPACK_PACKAGE_EXECUTABLES "${EXECUTABLE_NAME};Start ${CPACK_PACKAGE_NAME}" )
2010-07-03 15:54:26 +02:00
# Version settings.
# * the short way.
2022-07-19 01:55:34 +02:00
#SET(CPACK_PACKAGE_VERSION "${VERSION_LONG}")
2010-07-03 15:54:26 +02:00
# * another way.
2022-07-19 01:55:34 +02:00
SET ( CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}" )
SET ( CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}" )
SET ( CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}" )
SET ( CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}${PROJECT_VERSION_METADATA}" )
IF ( NOT SVN_FIND_REV_FAILED )
SET ( CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-r${SVN_REV}" )
ENDIF ( NOT SVN_FIND_REV_FAILED )
2010-07-03 15:54:26 +02:00
# Binary package settings.
2010-09-16 23:46:02 +02:00
SET ( PACKAGE_FILE_PREFIX "${INTERNAL_NAME}" )
2010-07-03 15:54:26 +02:00
#SET(CPACK_OUTPUT_CONFIG_FILE "/home/andy/vtk/CMake-bin/CPackConfig.cmake")
#SET(CPACK_PACKAGE_DESCRIPTION_FILE "/home/andy/vtk/CMake/Copyright.txt")
#SET(CPACK_IGNORE_FILES "/\\.svn/;\\.swp$;\\.#;/#;${CPACK_IGNORE_FILES}")
# Source package settings.
#SET(CPACK_SOURCE_OUTPUT_CONFIG_FILE "/home/andy/vtk/CMake-bin/CPackSourceConfig.cmake")
SET ( CPACK_SOURCE_PACKAGE_FILE_NAME "${PACKAGE_FILE_PREFIX}-${CPACK_PACKAGE_VERSION}-src" )
#SET(CPACK_RESOURCE_FILE_LICENSE "/home/andy/vtk/CMake/Copyright.txt")
#SET(CPACK_RESOURCE_FILE_README "/home/andy/vtk/CMake/Templates/CPack.GenericDescription.txt")
#SET(CPACK_RESOURCE_FILE_WELCOME "/home/andy/vtk/CMake/Templates/CPack.GenericWelcome.txt")
SET ( CPACK_SOURCE_IGNORE_FILES
2010-11-16 23:15:27 +01:00
" / i n s t a l l e r / " " / d o c / d e s i g n / " " / d o c / d e v e l d o c " " / d o c / w e b s i t e / " " / _ C P a c k _ P a c k a g e s / "
" / C M a k e C a c h e \ \ \ \ . t x t $ " " / i n s t a l l _ m a n i f e s t \ \ \ \ . t x t $ " " / x m l v e r s i o n _ l o c \ \ \ \ . t x t $ "
" / c o n f i g \ \ \ \ . h $ " " / v e r s i o n \ \ \ \ . h $ " " / d o x y g e n _ c o n f i g $ "
" / \ \ \ \ . s v n / " " / \ \ \ \ . d i r / " " / C M a k e F i l e s / "
2010-07-03 15:54:26 +02:00
" c m a k e _ i n s t a l l \ \ \ \ . c m a k e $ " " C P a c k C o n f i g \ \ \ \ . c m a k e $ " " C P a c k S o u r c e C o n f i g \ \ \ \ . c m a k e $ "
2010-11-16 23:15:27 +01:00
" \ \ \ \ . b a k $ " " \ \ \ \ . f l c $ " " #.*#$" "~$" "\\\\.~.*"
2011-03-05 16:50:27 +01:00
" \ \ \ \ . x c f $ " " \ \ \ \ . x c f \ \ \ \ . b z 2 $ " " \ \ \ \ . p s d $ "
" \ \ \ \ . e x e $ " " / s d 2 - . * $ " " / s p e e d - d r e a m s - 2 $ " " / x m l v e r s i o n $ "
" \ \ \ \ . z i p $ " " \ \ \ \ . t a r \ \ \ \ . b z 2 $ " " \ \ \ \ . t a r \ \ \ \ . g z $ " " \ \ \ \ . t a r \ \ \ \ . Z $ " " \ \ \ \ . t a r \ \ \ \ . 7 z $ " )
2010-07-03 15:54:26 +02:00
##########################################################################################
# Put Linux install information here
2015-08-31 02:04:57 +02:00
IF ( UNIX AND NOT APPLE )
2010-07-03 15:54:26 +02:00
SET ( PACKAGERS_BINARY "DEB" CACHE STRING "CPack binary package generators to use (separated with ';', among DEB, RPM, STGZ, TGZ, TBZ2, TZ, ZIP)" )
2011-05-03 15:15:11 +02:00
MARK_AS_ADVANCED ( PACKAGERS_BINARY )
2010-07-06 00:13:54 +02:00
SET ( PACKAGERS_SOURCE "TBZ2" CACHE STRING "CPack source package generators to use (separated with ';', among TGZ, TBZ2, TZ, ZIP)" )
2011-05-03 15:15:11 +02:00
MARK_AS_ADVANCED ( PACKAGERS_SOURCE )
2022-07-20 22:37:03 +02:00
SET ( CPACK_PACKAGE_NAME ${ PACKAGE_FILE_PREFIX } CACHE STRING "" FORCE )
2022-07-22 20:31:30 +02:00
# On debian, auto-detect dependencies
2022-07-20 22:37:03 +02:00
SET ( CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON )
2022-07-22 20:31:30 +02:00
# Or manually set the dependencies
# from Linux Mint 20 (Ubuntu 20.04)
#SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.29), libcurl4 (>= 7.16.2), libenet7, libexpat1 (>= 2.0.1), libgcc-s1 (>= 3.0), libglu1-mesa | libglu1, libglx0, libjpeg8 (>= 8c), libopenal1 (>= 1.14), libopengl0, libopenscenegraph160, libopenthreads21, libplib1, libpng16-16 (>= 1.6.2-1), libsdl2-2.0-0 (>= 2.0.10), libsdl2-mixer-2.0-0 (>= 2.0.2), libstdc++6 (>= 9), zlib1g (>= 1:1.1.4)")
# This causes package name to have undersocres connecting the name, version, and arch
set ( CPACK_DEBIAN_FILE_NAME DEB-DEFAULT )
2010-07-03 15:54:26 +02:00
# Put other Debian-based distros settings here.
# Source package specific settings.
2010-11-16 23:15:27 +01:00
LIST ( APPEND CPACK_SOURCE_IGNORE_FILES "Makefile$" "\\\\.so$" )
2010-07-03 15:54:26 +02:00
2015-08-31 02:04:57 +02:00
ENDIF ( UNIX AND NOT APPLE )
2010-02-28 10:04:35 +01:00
2010-07-03 15:54:26 +02:00
##########################################################################################
# Put Windows install information here.
# (NSIS must be installed on your computer for this to work)
2010-02-28 10:04:35 +01:00
IF ( WIN32 )
2010-07-03 15:54:26 +02:00
2010-07-10 21:21:13 +02:00
# General note: There is a bug in NSI that does not handle full unix paths properly.
# Make sure there is at least one set of four (4) backlasshes.
2022-07-19 01:55:34 +02:00
SET ( CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL True )
SET ( CPACK_PACKAGE_INSTALL_DIRECTORY "${INTERNAL_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}${PROJECT_VERSION_METADATA}" )
2010-09-16 23:46:02 +02:00
2010-07-03 15:54:26 +02:00
SET ( EXECUTABLE_PATHNAME "$INSTDIR\\\\bin\\\\${EXECUTABLE_NAME}.exe" )
SET ( PACKAGERS_BINARY "NSIS" CACHE STRING "CPack binary package generators to use (separated with ';', among NSIS, CygwinBinary, STGZ, TGZ, TBZ2, TZ, ZIP)" )
2011-05-03 15:15:11 +02:00
MARK_AS_ADVANCED ( PACKAGERS_BINARY )
2010-07-06 00:13:54 +02:00
SET ( PACKAGERS_SOURCE "ZIP" CACHE STRING "CPack source package generators to use (separated with ';', among TGZ, TBZ2, TZ, ZIP)" )
2011-05-03 15:15:11 +02:00
MARK_AS_ADVANCED ( PACKAGERS_SOURCE )
2010-07-03 15:54:26 +02:00
2020-04-20 04:34:33 +02:00
SET ( CPACK_PACKAGE_FILE_NAME "${PACKAGE_FILE_PREFIX}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}-setup" )
2022-07-19 03:59:04 +02:00
SET ( CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}${PROJECT_VERSION_METADATA}" )
2022-07-19 01:55:34 +02:00
SET ( CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION_MAJOR}" )
#SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
2010-07-03 15:54:26 +02:00
2010-11-16 23:15:27 +01:00
# Icon for the generated installer/uninstaller files.
2010-07-03 15:54:26 +02:00
SET ( CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}\\\\data\\\\data\\\\icons\\\\icon.ico" )
2022-07-19 01:55:34 +02:00
SET ( CPACK_NSIS_MUI_UNIICON "${CMAKE_SOURCE_DIR}\\\\data\\\\data\\\\icons\\\\icon.ico" )
2022-07-19 03:59:04 +02:00
SET ( CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}\\\\data\\\\data\\\\img\\\\header.bmp" )
2022-07-20 05:23:27 +02:00
IF ( NOT ${ CMAKE_VERSION } VERSION_LESS "3.5" )
SET ( CPACK_NSIS_MUI_WELCOMEFINISHPAGE_BITMAP "${CMAKE_SOURCE_DIR}\\\\data\\\\data\\\\img\\\\header-vert.bmp" )
SET ( CPACK_NSIS_MUI_UNWELCOMEFINISHPAGE_BITMAP "${CMAKE_SOURCE_DIR}\\\\data\\\\data\\\\img\\\\header-vert.bmp" )
ENDIF ( NOT ${ CMAKE_VERSION } VERSION_LESS "3.5" )
IF ( NOT ${ CMAKE_VERSION } VERSION_LESS "3.17" )
SET ( CPACK_NSIS_MUI_HEADERIMAGE "${CMAKE_SOURCE_DIR}\\\\data\\\\data\\\\img\\\\header.bmp" )
ENDIF ( NOT ${ CMAKE_VERSION } VERSION_LESS "3.17" )
2010-07-03 15:54:26 +02:00
2010-11-16 23:15:27 +01:00
# Extra shortcuts to add in the start menu (a list of pairs : URL, Menu label).
2010-07-10 21:21:13 +02:00
SET ( CPACK_NSIS_MENU_LINKS
2022-07-20 18:52:59 +02:00
" $ { C P A C K _ P A C K A G E _ C O N T A C T } " " P r o j e c t H o m e p a g e "
" h t t p s : / / s o u r c e f o r g e . n e t / p / s p e e d - d r e a m s / d i s c u s s i o n / " " C o m m u n i t y "
" h t t p s : / / s o u r c e f o r g e . n e t / p / s p e e d - d r e a m s / t i c k e t s / " " B u g t r a c k e r "
" / d a t a / C O P Y I N G . t x t " " L i c e n s e "
" / d a t a / R E A D M E . t x t " " R e a d m e "
" / d o c / h o w _ t o _ d r i v e . h t m l " " U s e r m a n u a l " )
2010-07-03 15:54:26 +02:00
2022-07-19 01:55:34 +02:00
# Icon in the add/remove control panel. Must be an .exe file
2010-07-03 15:54:26 +02:00
Set ( CPACK_NSIS_INSTALLED_ICON_NAME "${EXECUTABLE_PATHNAME}" )
2022-07-19 01:55:34 +02:00
# Executable to (optionally) run after install
2022-07-20 04:12:16 +02:00
SET ( CPACK_NSIS_MUI_FINISHPAGE_RUN "${EXECUTABLE_NAME}" )
2022-07-19 01:55:34 +02:00
2010-07-03 15:54:26 +02:00
SET ( CPACK_NSIS_URL_INFO_ABOUT "${CPACK_PACKAGE_CONTACT}" )
SET ( CPACK_NSIS_HELP_LINK "${CPACK_PACKAGE_CONTACT}" )
2022-07-20 21:59:14 +02:00
# Override Start menu entry
SET ( CPACK_PACKAGE_EXECUTABLES
" $ { E X E C U T A B L E _ N A M E } " " $ { C P A C K _ N S I S _ D I S P L A Y _ N A M E } "
C A C H E S T R I N G " " F O R C E )
2010-07-03 15:54:26 +02:00
# Add a page in the install wizard for options :
# - adding the installation path in the PATH,
# - adding a shortcut to start the installed app on the desktop.
#SET(CPACK_NSIS_MODIFY_PATH "ON")
# Another way to add a shortcut to start the installed app on the desktop :
2022-07-20 21:59:14 +02:00
# This ONLY works if SET(CPACK_NSIS_MODIFY_PATH "ON") which also enables the whole modify PATH page
2010-07-03 15:54:26 +02:00
#SET(CPACK_CREATE_DESKTOP_LINKS "${EXECUTABLE_NAME}")
# But this works.
2022-07-20 21:59:14 +02:00
SET ( SHORTCUT_TARGET "$DESKTOP\\\\${CPACK_NSIS_DISPLAY_NAME}.lnk" )
2022-07-19 01:55:34 +02:00
SET ( CPACK_NSIS_EXTRA_INSTALL_COMMANDS "
C r e a t e S h o r t C u t \ \ \ " $ { S H O R T C U T _ T A R G E T } \ \ \ " \ \ \ " $ { E X E C U T A B L E _ P A T H N A M E } \ \ \ "
W r i t e R e g S t r H K L M ' S o f t w a r e \ \ \ \ $ { C P A C K _ P A C K A G E _ V E N D O R } \ \ \ \ $ { C P A C K _ P A C K A G E _ I N S T A L L _ R E G I S T R Y _ K E Y } ' ' V e r s i o n E x t r a ' ' $ { P R O J E C T _ V E R S I O N _ M E T A D A T A } '
W r i t e R e g D W O R D H K L M ' S o f t w a r e \ \ \ \ $ { C P A C K _ P A C K A G E _ V E N D O R } \ \ \ \ $ { C P A C K _ P A C K A G E _ I N S T A L L _ R E G I S T R Y _ K E Y } ' ' V e r s i o n M a j o r ' ' $ { C P A C K _ P A C K A G E _ V E R S I O N _ M A J O R } '
W r i t e R e g D W O R D H K L M ' S o f t w a r e \ \ \ \ $ { C P A C K _ P A C K A G E _ V E N D O R } \ \ \ \ $ { C P A C K _ P A C K A G E _ I N S T A L L _ R E G I S T R Y _ K E Y } ' ' V e r s i o n M i n o r ' ' $ { C P A C K _ P A C K A G E _ V E R S I O N _ M I N O R } '
W r i t e R e g D W O R D H K L M ' S o f t w a r e \ \ \ \ $ { C P A C K _ P A C K A G E _ V E N D O R } \ \ \ \ $ { C P A C K _ P A C K A G E _ I N S T A L L _ R E G I S T R Y _ K E Y } ' ' V e r s i o n P a t c h ' ' $ { C P A C K _ P A C K A G E _ V E R S I O N _ P A T C H } '
" )
SET ( CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "
D e l e t e \ \ \ " $ { S H O R T C U T _ T A R G E T } \ \ \ "
" )
2023-02-27 04:57:31 +01:00
IF ( OPTION_TRACKEDITOR )
set ( CPACK_NSIS_CREATE_ICONS_EXTRA
" C r e a t e S h o r t C u t ' $ S M P R O G R A M S \ \ \ \ $ S T A R T M E N U _ F O L D E R \ \ \ \ S D 2 T r a c k E d i t o r . l n k ' ' $ I N S T D I R \ \ \ \ b i n \ \ \ \ s d 2 - t r a c k e d i t o r . j a r ' ' ' ' ' 0 S W _ S H O W N O R M A L ' ' ' T r a c k E d i t o r ' " )
set ( CPACK_NSIS_DELETE_ICONS_EXTRA
" D e l e t e ' $ S M P R O G R A M S \ \ \ \ $ S T A R T _ M E N U \ \ \ \ S D 2 T r a c k E d i t o r . l n k ' " )
ENDIF ( OPTION_TRACKEDITOR )
2010-07-03 15:54:26 +02:00
# Source package specific settings.
LIST ( APPEND CPACK_SOURCE_IGNORE_FILES
2010-07-06 00:13:54 +02:00
" / V T u n e / "
2010-07-03 15:54:26 +02:00
" / R e l e a s e / " " / D e b u g / " " / R e l W i t h D e b I n f o / " " / M i n S i z e R e l / "
" / r e l e a s e / " " / d e b u g / " " / r e l w i t h d e b i n f o / " " / m i n s i z e r e l / "
2010-11-16 23:15:27 +01:00
" \ \ \ \ . s l n $ " " \ \ \ \ . s u o $ " " \ \ \ \ . n c b $ " " \ \ \ \ . v c p r o j * $ " " \ \ \ \ . d l l $ " )
2010-07-03 15:54:26 +02:00
2010-07-06 00:13:54 +02:00
# Add the PACKAGE_SRC project in the MSVC solution
2010-09-16 23:46:02 +02:00
# (CMake 2.6 and 2.8 fail to do this itself).
2022-07-19 01:55:34 +02:00
#ADD_CUSTOM_TARGET(PACKAGE_SRC)
#ADD_CUSTOM_COMMAND(TARGET PACKAGE_SRC
# COMMAND ${CMAKE_CPACK_COMMAND} -C $(OutDir) --config ./CPackSourceConfig.cmake)
2010-07-03 15:54:26 +02:00
2010-02-28 10:04:35 +01:00
ENDIF ( WIN32 )
2010-07-03 15:54:26 +02:00
##########################################################################################
# Put Mac OS X install information here
IF ( APPLE )
SET ( PACKAGERS_BINARY "DragNDrop" CACHE STRING "CPack binary package generators to use (separated with ';', among Bundle, DragNDrop, PackageMaker, OSXX11, STGZ, TGZ, TBZ2, TZ, ZIP)" )
2011-05-03 15:15:11 +02:00
MARK_AS_ADVANCED ( PACKAGERS_BINARY )
2010-07-06 00:13:54 +02:00
SET ( PACKAGERS_SOURCE "TBZ2" CACHE STRING "CPack source package generators to use (separated with ';', among TGZ, TBZ2, TZ, ZIP)" )
2011-05-03 15:15:11 +02:00
MARK_AS_ADVANCED ( PACKAGERS_SOURCE )
2010-07-03 15:54:26 +02:00
# Source package specific settings.
LIST ( APPEND CPACK_SOURCE_IGNORE_FILES "Makefile$" )
2020-04-14 23:17:56 +02:00
SET ( CPACK_INSTALLED_DIRECTORIES "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_PREFIX};${CMAKE_INSTALL_PREFIX}" )
SET ( CPACK_INSTALL_CMAKE_PROJECTS "" )
SET ( CPACK_DMG_DS_STORE "${CMAKE_SOURCE_DIR}/packaging/OSX/DS_Store-full" )
2020-04-20 20:20:19 +02:00
SET ( CPACK_DMG_VOLUME_NAME "Speed Dreams ${VERSION}" )
# Configure the base package scripts...
# TODO use ${CPACK_PACKAGE_NAME} ${VERSION}" ??
2022-03-07 21:59:37 +01:00
SET ( DMG_VOL_NAME "Speed Dreams base ${VERSION}" )
2020-04-20 20:20:19 +02:00
SET ( DMG_FINDER_SCRIPT "findersettingsbase.scpt" )
2022-03-07 21:59:37 +01:00
SET ( READ_WRITE_DMG_NAME "${INTERNAL_NAME}-base-${VERSION}-r${SVN_REV}-${CPACK_SYSTEM_NAME}-rw.dmg" )
SET ( READ_ONLY_DMG_NAME "${INTERNAL_NAME}-base-${VERSION}-r${SVN_REV}-${CPACK_SYSTEM_NAME}.dmg" )
2020-04-20 20:20:19 +02:00
string ( REPLACE ".app" "-base.app" SD_BASE_BUNDLE_NAME "${CMAKE_INSTALL_PREFIX}" )
2020-04-21 20:01:12 +02:00
2020-04-20 20:20:19 +02:00
# TODO make ${SD_BUNDLE_NAME} a CACHE variable and use it everywhere instead of ${CMAKE_INSTALL_PREFIX}??
SET ( SD_BUNDLE_NAME "${SD_BASE_BUNDLE_NAME}" )
CONFIGURE_FILE ( "${CMAKE_CURRENT_SOURCE_DIR}/packaging/OSX/packagedmg.cmake.in"
" $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / p a c k a g e b a s e d m g . c m a k e " @ O N L Y )
CONFIGURE_FILE ( "${CMAKE_CURRENT_SOURCE_DIR}/packaging/OSX/findersettings.scpt.in"
" $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / $ { D M G _ F I N D E R _ S C R I P T } " @ O N L Y )
2020-04-20 04:34:33 +02:00
2020-04-20 20:20:19 +02:00
# Now configure the full package scripts...
2020-04-20 04:34:33 +02:00
# TODO use ${CPACK_PACKAGE_NAME} ${VERSION}" ??
SET ( DMG_VOL_NAME "Speed Dreams ${VERSION}" )
2020-04-20 20:20:19 +02:00
SET ( DMG_FINDER_SCRIPT "findersettingsfull.scpt" )
2020-04-20 04:34:33 +02:00
SET ( READ_WRITE_DMG_NAME "${INTERNAL_NAME}-${VERSION}-r${SVN_REV}-${CPACK_SYSTEM_NAME}-rw.dmg" )
SET ( READ_ONLY_DMG_NAME "${INTERNAL_NAME}-${VERSION}-r${SVN_REV}-${CPACK_SYSTEM_NAME}.dmg" )
2020-04-20 20:20:19 +02:00
# TODO make ${SD_BUNDLE_NAME} a CACHE variable and use it everywhere instead of ${CMAKE_INSTALL_PREFIX}??
2020-04-20 04:34:33 +02:00
SET ( SD_BUNDLE_NAME "${CMAKE_INSTALL_PREFIX}" )
2020-04-20 20:20:19 +02:00
CONFIGURE_FILE ( "${CMAKE_CURRENT_SOURCE_DIR}/packaging/OSX/packagedmg.cmake.in"
2020-04-20 04:34:33 +02:00
" $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / p a c k a g e f u l l d m g . c m a k e " @ O N L Y )
CONFIGURE_FILE ( "${CMAKE_CURRENT_SOURCE_DIR}/packaging/OSX/findersettings.scpt.in"
2020-04-20 20:20:19 +02:00
" $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / $ { D M G _ F I N D E R _ S C R I P T } " @ O N L Y )
2010-07-03 15:54:26 +02:00
2020-08-30 06:46:14 +02:00
# Create a script to create the base bundle from the full bundle
CONFIGURE_FILE ( "${CMAKE_CURRENT_SOURCE_DIR}/packaging/OSX/createbaseapp.cmake.in"
" $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / c r e a t e b a s e a p p . c m a k e " @ O N L Y )
2010-07-03 15:54:26 +02:00
ENDIF ( APPLE )
##########################################################################################
# Final settings.
SET ( CPACK_GENERATOR ${ PACKAGERS_BINARY } )
SET ( CPACK_SOURCE_GENERATOR ${ PACKAGERS_SOURCE } )
2020-04-20 04:34:33 +02:00
#INCLUDE(CPack)