cmake: better cmake messages, don't overwrite CPacks default

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38802 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Peter Kümmel 2011-05-21 12:17:05 +00:00
parent a522dd5035
commit 8759fb5f7f

View File

@ -118,7 +118,11 @@ if(LYX_INSTALL)
set(LYX_NLS ON)
if (WIN32)
set(LYX_HUNSPELL ON)
set(LYX_BUNDLE ON)
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)
message(STATUS "NSIS files are created in ${CMAKE_BINARY_DIR}/installer")
endif()
set(LYX_CONSOLE OFF)
set(LYX_PACKAGE_SUFFIX ON)
@ -229,7 +233,14 @@ endif()
if(LYX_BUNDLE)
set(LYX_CPACK 1)
message(STATUS)
message(STATUS "Bundle creation is enabled (experimental):")
message(STATUS " make")
message(STATUS " make install/strip")
message(STATUS " make package")
if(APPLE)
set(CPACK_GENERATOR DragNDrop)
set(LYX_BUILD_BUNDLE MACOSX_BUNDLE)
set(LYX_DATA_SUBDIR ${PACKAGE_BASE}${PROGRAM_SUFFIX}.app/Contents/Resources/ CACHE STRING "Bundle Contents dir" FORCE)
set(MACOSX_BUNDLE_STARTUP_COMMAND ${PACKAGE_BASE}${PROGRAM_SUFFIX}.app)
@ -237,17 +248,15 @@ if(LYX_BUNDLE)
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/LyX CACHE PATH "Mac bundle dir" FORCE)
set(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
endif()
elseif(UNIX)
set(CPACK_GENERATOR STGZ)
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")
elseif(WIN32)
set(CPACK_GENERATOR ZIP)
message(STATUS "A zipped-only release could be created by building the 'PACKAGE' project")
endif()
message(STATUS)
message(STATUS "Bundle creation is enabled (experimental):")
message(STATUS " make")
message(STATUS " make install/strip")
message(STATUS " make package")
message(STATUS "To increase turn around speed use:")
message(STATUS " cmake -DLYX_MERGE_FILES=1 -DLYX_NO_OPTIMIZE=1 -DLYX_INSTALL=1 -DLYX_DMG=1 ../trunk")
message(STATUS "or use the shell script 'development/cmake/dmg'")
message(STATUS)
endif()
@ -683,11 +692,8 @@ endif()
# CPACK_RESOURCE_FILE_README and CPACK_RESOURCE_FILE_WELCOME
if(UNIX)
set(CPACK_GENERATOR STGZ)
set(CPACK_SOURCE_GENERATOR TGZ TBZ2)
elseif(WIN32)
set(CPACK_GENERATOR NSIS ZIP)
set(CPACK_BINARY_ZIP 1)
set(CPACK_SOURCE_GENERATOR ZIP)
endif()
@ -700,24 +706,6 @@ set(CPACK_SOURCE_INSTALLED_DIRECTORIES "${TOP_SRC_DIR};/") # http://www.mail-arc
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()