]> git.lyx.org Git - lyx.git/blobdiff - development/cmake/CMakeLists.txt
autogeneration of tex2lyx.1 now from tex2lyx.1in
[lyx.git] / development / cmake / CMakeLists.txt
index 305f2900e6368b7d3f8ebeb967417b6de1b6e852..fb72be7426b36db5afd1d9bce0f309e2f53b7149 100644 (file)
@@ -66,11 +66,11 @@ foreach(_c_l ${_config_lines} )
 endforeach(_c_l)
 
 if(UseVersionSuffix)
-  message("-- Using versioned PACKAGE. Disable with -DUseVersionSuffix=0")
+  message(STATUS "-- Using versioned PACKAGE. Disable with -DUseVersionSuffix=0")
   set(PACKAGE ${PACKAGE_BASE}${LYX_INSTALL_SUFFIX})
   set(PROGRAM_SUFFIX "${LYX_INSTALL_SUFFIX}")
 else()
-  message("-- PACKAGE not versioned, to enable use -DUseVersionSuffix=1")
+  message(STATUS "-- PACKAGE not versioned, to enable use -DUseVersionSuffix=1")
   set(PACKAGE ${PACKAGE_BASE})
   set(PROGRAM_SUFFIX "")
 endif()
@@ -81,7 +81,7 @@ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
     # don't use the default "/usr/local"
     # but respect the user-choice on the command-line
     SET(CMAKE_INSTALL_PREFIX
-      "/usr/local/share/lyx${LYX_INSTALL_SUFFIX}" CACHE PATH "LyX install prefix" FORCE)
+      "/usr/local/lyx${LYX_INSTALL_SUFFIX}" CACHE PATH "LyX install prefix" FORCE)
   endif()
   if(WIN32)
     SET(CMAKE_INSTALL_PREFIX
@@ -194,20 +194,20 @@ if(use_external_libintl)
        add_definitions(-DHAVE_GETTEXT)
 endif()
 
-message("")
+message(STATUS "")
 if(nls OR all)
        set(nls TRUE CACHE TYPE STRING)
        add_definitions(-DENABLE_NLS=1)
-       message("----- Building with ENABLE_NLS")
+       message(STATUS "----- Building with ENABLE_NLS")
 else() 
-       message("----- No nls, to enable use -Dnls=1")
+       message(STATUS "----- No nls, to enable use -Dnls=1")
 endif()
 set(nls)
 if(ASPELL_FOUND)
        add_definitions(-DUSE_ASPELL=1)
-       message("----- Building with USE_ASPELL")
+       message(STATUS "----- Building with USE_ASPELL")
 else() 
-       message("----- No aspell, to get more information use -Daspell=1")
+       message(STATUS "----- No aspell, to get more information use -Daspell=1")
 endif()
 set(all)
 
@@ -216,9 +216,9 @@ if(WIN32)
                set(noconsole TRUE CACHE TYPE STRING)
                set(WIN32_CONSOLE WIN32)
                set(LYX_QTMAIN_LIBRARY ${QT_QTMAIN_LIBRARY})
-               message("----- Console disabled")
+               message(STATUS "----- Console disabled")
        else()
-               message("----- Console enabled, disable it with -Dnoconsole=1")
+               message(STATUS "----- Console enabled, disable it with -Dnoconsole=1")
        endif()
        if(MSVC)
                add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DNOMINMAX)      
@@ -229,7 +229,7 @@ if(WIN32)
        endif()
 endif()
 
-message("")
+message(STATUS "")
 foreach(_v PACKAGE PACKAGE_VERSION
     PROGRAM_SUFFIX LYX_DATE LYX_DIR_VER LYX_USERDIR_VER
     LYX_ABS_TOP_SRCDIR
@@ -238,17 +238,17 @@ foreach(_v PACKAGE PACKAGE_VERSION
     message(FATAL_ERROR "${_v} not defined")
   endif()
   string(SUBSTRING "${_v}                            " 0 28 _v1)
-  message("----- ${_v1}: ${${_v}}")
+  message(STATUS "----- ${_v1}: ${${_v}}")
 endforeach(_v)
-message("")
+message(STATUS "")
 
 
 add_definitions(-DBOOST_USER_CONFIG="<config.h>")
        
 if(MSVC AND NOT disable-pch AND NOT MERGE_FILES)
-       message("-----")
-       message("----- using precompiled headers, disable with -Ddisable-pch=1")
-       message("-----")
+       message(STATUS "-----")
+       message(STATUS "----- using precompiled headers, disable with -Ddisable-pch=1")
+       message(STATUS "-----")
        configure_file(${CMAKE_SOURCE_DIR}/pcheaders.h
                ${CMAKE_BINARY_DIR}/pcheaders.h)
        configure_file(${CMAKE_SOURCE_DIR}/config.cpp.cmake
@@ -270,9 +270,9 @@ if(MSVC AND NOT disable-pch AND NOT MERGE_FILES)
                "${CMAKE_CXX_FLAGS_MINSIZEREL} /DLYX_PCH_STL /DLYX_PCH_BOOST")
 else()
        if(MSVC)
-               message("-----")
-               message("----- precompiled headers disabled, enable with -Ddisable-pch=0")
-               message("-----")
+               message(STATUS "-----")
+               message(STATUS "----- precompiled headers disabled, enable with -Ddisable-pch=0")
+               message(STATUS "-----")
        endif()
        set(disable-pch TRUE CACHE TYPE STRING)
        macro(lyx_add_msvc_pch)
@@ -323,7 +323,7 @@ if(MSVC)
                
                set(CMAKE_CXX_FLAGS_DEBUG
                        "${CMAKE_CXX_FLAGS_DEBUG} /Wp64 ${MSVC_W_ERROR} ${MSVC_W_DISABLE}")
-               set(CMAKE_CXX_FLAGS_RELEASEs
+               set(CMAKE_CXX_FLAGS_RELEASE
                        "${CMAKE_CXX_FLAGS_RELEASE} /Wp64 ${MSVC_W_ERROR} ${MSVC_W_DISABLE}")
                set(CMAKE_CXX_FLAGS_MINSIZEREL
                        "${CMAKE_CXX_FLAGS_MINSIZEREL} /Wp64 ${MSVC_W_ERROR} ${MSVC_W_DISABLE}")
@@ -348,10 +348,10 @@ if(MSVC)
                
        endif()
        
-       message("----- Warning level      : ${CMAKE_CXX_WARNING_LEVEL}  ${WARNING_LEVEL_MESSAGE}")
-       message("----- Warnings as errors : ${MSVC_W_ERROR}")
-       message("----- Warnings disabled  : ${MSVC_W_DISABLE}")
-       message("")
+       message(STATUS "----- Warning level      : ${CMAKE_CXX_WARNING_LEVEL}  ${WARNING_LEVEL_MESSAGE}")
+       message(STATUS "----- Warnings as errors : ${MSVC_W_ERROR}")
+       message(STATUS "----- Warnings disabled  : ${MSVC_W_DISABLE}")
+       message(STATUS "")
        
 endif()
 
@@ -395,33 +395,34 @@ include(../Install)
 
 SET(CPACK_PACKAGE_VERSION_MAJOR "${LYX_MAJOR_VERSION}")
 SET(CPACK_PACKAGE_VERSION_MINOR "${LYX_MINOR_VERSION}")
-SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A WYSIWYM (What You See Is What You Mean) document processor")
+FILE(STRINGS "${TOP_SRC_DIR}/development/cmake/LyX_summary.txt" CPACK_PACKAGE_DESCRIPTION_SUMMARY)
+#SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A WYSIWYM (What You See Is What You Mean) document processor")
 
 SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${LYX_INSTALL_SUFFIX}")
-SET(CPACK_SET_DESTDIR "ON")                          # needed by rpm
-SET(CPACK_PACKAGE_CONTACT "${PACKAGE_BUGREPORT}") # needed by deb
+#
+# needed by rpm
+SET(CPACK_SET_DESTDIR "ON")
+FILE(READ "${TOP_SRC_DIR}/development/cmake/LyX_license.txt" CPACK_RPM_PACKAGE_LICENSE)
+SET(CPACK_RPM_PACKAGE_GROUP "Applications/Publishing")
+SET(CPACK_RPM_PACKAGE_VENDOR "The LyX team")
+#
+# the next ones are needed by deb
+SET(CPACK_PACKAGE_CONTACT "${PACKAGE_BUGREPORT}")
 SET(CPACK_SOURCE_PACKAGE_FILE_NAME "lyx-${LYX_INSTALL_SUFFIX}")
-SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY
-"LyX is a document processor that encourages an approach to writing
-based on the structure of your documents, not their appearance. It
-is released under a Free Software/Open Source license (GPL v.2).
-
-LyX is for people that write and want their writing to look great,
-right out of the box. No more endless tinkering with formatting
-details, 'finger painting' font attributes or futzing around with
-page boundaries. You just write. In the background, Prof. Knuth's
-legendary TeX typesetting engine makes you look good.
-
-On screen, LyX looks like any word processor; its printed output --
-or richly cross-referenced PDF, just as readily produced -- looks
-like nothing else. Gone are the days of industrially bland .docs,
-all looking similarly not-quite-right, yet coming out unpredictably
-different on different printer drivers. Gone are the crashes
-'eating' your dissertation the evening before going to press.
-
-LyX is stable and fully featured. It is a multi-platform, fully
-internationalized application running natively on Unix/Linux, the
-Macintosh and modern Windows platforms.")
+#
+# for the next ones, cmake insists on data  with values in some file
+SET(CPACK_PACKAGE_DESCRIPTION_FILE "${TOP_SRC_DIR}/development/cmake/LyX_description.txt")
+SET(CPACK_RESOURCE_FILE_LICENSE "${TOP_SRC_DIR}/development/cmake/LyX_license.txt")
+
+# Find the revision number and use it as the release in rpm-package-build.
+# This way we may omit the otherwise needed "--force" parameter when
+# installing from that rpm package.
+FIND_PROGRAM(_svnversion svnversion)
+EXECUTE_PROCESS(COMMAND ${_svnversion} WORKING_DIRECTORY "${TOP_SRC_DIR}" OUTPUT_VARIABLE CPACK_RPM_PACKAGE_RELEASE OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+# 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
 
 include(CPack)
 #Now it is possible to create some packages
@@ -433,5 +434,3 @@ include(CPack)
 # 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
 #
-
-