-# we do not have a readme or welcome data,
-# so we do not provide infofiles for
-# CPACK_RESOURCE_FILE_README and CPACK_RESOURCE_FILE_WELCOME
-
-if(WIN32)
- set(CPACK_GENERATOR NSIS ZIP)
- set(CPACK_BINARY_ZIP 1)
-endif()
-
-
-set(CPACK_STRIP_FILES 1)
-
-# sources
-set(CPACK_SOURCE_INSTALLED_DIRECTORIES "${TOP_SRC_DIR};/") # http://www.mail-archive.com/cmake@cmake.org/msg33720.html
-set(CPACK_SOURCE_GENERATOR TGZ ZIP TBZ2)
-
-
-if(LYX_DMG)
- set(CPACK_PACKAGE_NAME LyX)
- set(CPACK_GENERATOR DragNDrop)
-
- # We start from bin/lyx.app, all is build into the final bundle folder
- # On Mac the paths to required shared libraries are hardcoded in the
- # binary/library. This is fixed by the macro 'fixup_bundle'
- # Hardcoded pathes to libraries are resolved automatically
-
-
- set(app ${bundle_dir}/LyX.app)
- set(contents_dir LyX.app/Contents/)
- install(DIRECTORY "${QT_PLUGINS_DIR}/imageformats" DESTINATION ${bundle_dir}/${contents_dir}/plugins COMPONENT Runtime)
-
- message(STATUS "Qt Plugins: ${QT_PLUGINS_DIR}/imageformats DESTINATION ${bundle_dir}/${contents_dir}/plugins")
-
- install(CODE
- "file(GLOB qt_plugins \"${bundle_dir}/${contents_dir}/plugins/imageformats/*${CMAKE_SHARED_LIBRARY_SUFFIX}\")
- include(BundleUtilities)
- fixup_bundle(\"${app}\" \"\${qt_plugins}\" \"${dir}\") "
- COMPONENT RUNTIME)
-
- file(WRITE ${CMAKE_BINARY_DIR}/qt.conf "")
- install(FILES ${CMAKE_BINARY_DIR}/qt.conf DESTINATION ${contents_dir}/Resources COMPONENT Runtime)
-
-endif()
-
-
-if(LYX_CPACK)
- 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
-#