-if(LYX_CPACK)
- set(CPACK_PACKAGE_NAME LyX)
- if(APPLE)
- set(CPACK_GENERATOR DragNDrop)
- elseif(WIN32)
- message(STATUS "Configuring NSIS files")
- configure_file(development/Win32/packaging/installer/lyx.nsi.cmake ${CMAKE_BINARY_DIR}/installer/lyx.nsi @ONLY)
- configure_file(development/Win32/packaging/installer/settings.nsh.cmake ${CMAKE_BINARY_DIR}/installer/settings-cmake.nsh @ONLY)
- configure_file(development/Win32/packaging/installer/include/declarations.nsh.cmake ${CMAKE_BINARY_DIR}/installer/declarations-cmake.nsh @ONLY)
- set(CPACK_GENERATOR ZIP)
- message(STATUS "NSIS files are created in ${CMAKE_BINARY_DIR}/installer")
- message(STATUS "A zipped only release could be created by building the 'PACKAGE' project")
- else()
- message(STATUS "Building self extracting binary bundle.")
- message(STATUS "To embed Qt in this bundle don't build with your system Qt:")
- message(STATUS " - fix PATH so a other qmake is found by cmake")
- message(STATUS " - fix LD_LIBRARY_PATH so lyx doesn't use system's Qt")
- endif()
-
- include(CPack)
-endif()
-
-
-#Now it is possible to create some packages
-# cd <BuildDir>
-# make package
-#############################################################################################
-# So, e.g. for variables
-# CMAKE_PROJECT_NAME : lyx
-# CPACK_PACKAGE_VERSION_MAJOR : 2
-# CPACK_PACKAGE_VERSION_MINOR : 0
-# CPACK_PACKAGE_VERSION_PATCH : 1
-# CMAKE_SYSTEM_NAME : Linux
-# CPACK_BINARY_DEB:BOOL : ON
-#
-# the package name builds as "lyx-2.0.1-Linux.deb"
-#
-############################## rpm ################################### deb ##################
-# create # cpack -G RPM --config CPackConfig.cmake # cpack -G DEB --config CPackConfig.cmake
-# creates =># lyx-2.0.1-Linux.rpm # lyx-2.0.1-Linux.deb
-# list # rpm -qlp lyx-2.0.1-Linux.rpm # dpkg-deb -c lyx-2.0.1-Linux.deb
-# install # rpm -U lyx-2.0.1-Linux.rpm # dpkg -i lyx-2.0.1-Linux.deb
-#