]> git.lyx.org Git - features.git/commitdiff
cmake: update TODO list, move svnrvison code, remove duplicated code
authorPeter Kümmel <syntheticpp@gmx.net>
Sun, 22 May 2011 08:18:54 +0000 (08:18 +0000)
committerPeter Kümmel <syntheticpp@gmx.net>
Sun, 22 May 2011 08:18:54 +0000 (08:18 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38806 a592a061-630c-0410-9148-cb99ea01b6c8

CMakeLists.txt
development/cmake/TODO.txt

index 2614e8a9928d71423e4b1bbaf1c84c5e43ed4073..32a2cec34b3bfd7252c1a57beb70924cf9442da6 100644 (file)
@@ -118,11 +118,6 @@ if(LYX_INSTALL)
        set(LYX_NLS ON)
        if (WIN32)
                set(LYX_HUNSPELL 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)
@@ -224,6 +219,24 @@ foreach(_c_l ${_config_lines} )
        endif()
 endforeach(_c_l)
 
+# 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(LYX_SVNVERSION svnversion)
+#message(STATUS "svnversion = ${LYX_SVNVERSION}")
+if(LYX_SVNVERSION)
+       # TODO revision number has nothing to do with cpack vars: split out
+       EXECUTE_PROCESS(COMMAND ${LYX_SVNVERSION} WORKING_DIRECTORY "${TOP_SRC_DIR}" OUTPUT_VARIABLE CPACK_RPM_PACKAGE_RELEASE OUTPUT_STRIP_TRAILING_WHITESPACE)
+       # We use this value also to set the package-patch-value
+       if(CPACK_RPM_PACKAGE_RELEASE MATCHES "^\([0-9]+\)")
+               set(CPACK_PACKAGE_VERSION_PATCH ${CMAKE_MATCH_1}) # TODO this is not the patch level
+               set(LYX_REVISION_VERSION ${CMAKE_MATCH_1})
+       endif()
+else()
+       set(LYX_REVISION_VERSION svn) #TODO use date
+endif()
+
+
 
 if(LYX_PROGRAM_SUFFIX)
        set(PROGRAM_SUFFIX "${LYX_INSTALL_SUFFIX}")
@@ -311,6 +324,13 @@ set(LYX_ABS_INSTALLED_LOCALEDIR "${LYX_ABS_INSTALLED_DATADIR}/${LYX_DATA_SUBDIR}
 set(LYX_ABS_TOP_SRCDIR "${TOP_SRC_DIR}")
 
 
+if(LYX_INSTALL AND 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)
+       message(STATUS "NSIS files are created in ${CMAKE_BINARY_DIR}/installer")
+endif()
 
 if(NOT GROUP_CODE)
        #set(GROUP_CODE "The Golden Code")
@@ -634,13 +654,9 @@ set(CPACK_PACKAGE_VERSION_MAJOR "${LYX_MAJOR_VERSION}")
 set(CPACK_PACKAGE_VERSION_MINOR "${LYX_MINOR_VERSION}")
 FILE(STRINGS "${TOP_SRC_DIR}/${LYX_CMAKE_DIR}/LyX_summary.txt" CPACK_PACKAGE_DESCRIPTION_SUMMARY)
 
-set(CPACK_SOURCE_GENERATOR TGZ ZIP TBZ2)
-set(CPACK_SOURCE_INSTALLED_DIRECTORIES "${TOP_SRC_DIR};/") # http://www.mail-archive.com/cmake@cmake.org/msg33720.html
 
 set(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${LYX_INSTALL_SUFFIX}")
 
-set(CPACK_SOURCE_GENERATOR TGZ ZIP TBZ2)
-set(CPACK_SOURCE_INSTALLED_DIRECTORIES "${TOP_SRC_DIR};/") # http://www.mail-archive.com/cmake@cmake.org/msg33720.html
 #
 # needed by rpm
 set(CPACK_SET_DESTDIR "ON")
@@ -670,39 +686,18 @@ endif()
 set(CPACK_PACKAGE_DESCRIPTION_FILE "${TOP_SRC_DIR}/${LYX_CMAKE_DIR}/LyX_description.txt")
 set(CPACK_RESOURCE_FILE_LICENSE "${TOP_SRC_DIR}/${LYX_CMAKE_DIR}/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(LYX_SVNVERSION svnversion)
-#message(STATUS "svnversion = ${LYX_SVNVERSION}")
-if(LYX_SVNVERSION)
-       EXECUTE_PROCESS(COMMAND ${LYX_SVNVERSION} WORKING_DIRECTORY "${TOP_SRC_DIR}" OUTPUT_VARIABLE CPACK_RPM_PACKAGE_RELEASE OUTPUT_STRIP_TRAILING_WHITESPACE)
-       # We use this value also to set the package-patch-value
-       if(CPACK_RPM_PACKAGE_RELEASE MATCHES "^\([0-9]+\)")
-               set(CPACK_PACKAGE_VERSION_PATCH ${CMAKE_MATCH_1}) # TODO this is not the patch level
-               set(LYX_REVISION_VERSION ${CMAKE_MATCH_1})
-       endif()
-else()
-       set(LYX_REVISION_VERSION svn) #TODO use date
-endif()
 
 
 # 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(UNIX)
-       set(CPACK_SOURCE_GENERATOR TGZ TBZ2)
-elseif(WIN32)
-       set(CPACK_SOURCE_GENERATOR ZIP)
-endif()
+# sources
+set(CPACK_SOURCE_INSTALLED_DIRECTORIES "${TOP_SRC_DIR};/") # http://www.mail-archive.com/cmake@cmake.org/msg33720.html
 
 
 set(CPACK_STRIP_FILES 1)
 
-# sources
-set(CPACK_SOURCE_INSTALLED_DIRECTORIES "${TOP_SRC_DIR};/") # http://www.mail-archive.com/cmake@cmake.org/msg33720.html
-
 
 
 if(LYX_CPACK)
index de051d9507c317f23263e89fa113c7a389b9aed5..7afbb0d96fd316cc5ecb0da7051929a366be9974 100644 (file)
@@ -1,25 +1,26 @@
 
 
 Defaults:
-  * NLS disabled by default.
+  * DONE: NLS should be enabled by default.
   * Eventually, cmake without option should generate a makefile that has reasonable defaults for everything
     (nls, spellcheck, build type, ...), at least when released.
 
 
 Help:
-  * I do not know how to have a list of variables from the command line
+  * DONE: I do not know how to have a list of variables from the command line
     (before I actually run it). cmake --help is not useful.
   * how can I see what the command line was. With autoconf I'd just
     do "make V=1", what shall I do with cmake?
 
 
 Bug fixing
-  * Run in place, without using LYX_DIR_20x
+  * DONE: Run in place, without using LYX_DIR_21x 
      copy the resources (bind/ ui/ layouts/ dicts/ thes/ ...) to the build stage (?)
      This is what I do: copy them from an autotools install into the cmake project.
         Package.cpp and config.h.cmake has to be fixed.
   * check that .tar.gz and .xz are identical to those from autotools
-  * Fix libintl, LYX_EXTERNAL_LIBINTL=OFF triggers compilation in intl even when LYX_NLS is OFF
+  * DONE: Fix libintl, LYX_EXTERNAL_LIBINTL=OFF triggers compilation in intl even when LYX_NLS is OFF
+  * *.po are too often generated by Visual Studio 
 
 
 Documentation
@@ -32,25 +33,26 @@ Documentation
 Features
   * I would like to see a BUILD_TYPE flag like in autotools, with automatic selection from lyx version
   * Disbale merging selectively
-  * Make .dmg
-  * Bundles for Mac OSX
+  * STARTED: Make .dmg
+  * STARTED: Bundles for Mac OSX
     with support for universal binaries (don't know if it currently is a problem to build them)
   * from the maintainer point of view these task are needed:
-      - .po remerge of strings in po/ (ie "make update-po")
+      - DONE: *.po remerge of strings in po/ (ie "make update-po")
       - tarball creation, most notably i dont see any list of files which should go into tarball, we dont want everything to go there
         (ie "make distcheck" to check tree is prepared for release, "make dist" for actual release)
     these are nice to have and present in autotools, though not critical
       - target for regenaration of lfuns manual would be nice (ie make lfundoc)
       - target for doxygen generation (ie make doxydoc)
+  * DONE: get patch version from configure.ac (regex)
 
 
 Cleanup
   * stdlib-debug mode should be merged with windows debug mode, since it is the same basically
-  * I do not like the weird paths where built files go. I really cannot find my way there
+  * DONE: I do not like the weird paths where built files go. I really cannot find my way there
   * Shouldn't we use lower case names everywhere (when possible)?
     Then the cmake files doesn't look that antiquated. And seeing an uppercase variable means
     that this variable wasn't introduced by lyx and is a cmake default name.
-  * port 'development/cmake/doc/ReplaceValues.pl' to python
+  * DONE: port 'development/cmake/doc/ReplaceValues.pl' to python
   * split master CMakeLists somehow: cpack, pcs, warnings, dependencies, defaults, install, options, ...
                                      remove dependencies between these modules