Commit Graph

98 Commits

Author SHA1 Message Date
Kornel Benko
8c0e1b5c70 Cmake build: Added convenience macro LYX_COMBO
Will be used later to allow selection between multiple alternatives.
2014-06-07 10:45:13 +02:00
Peter Kümmel
6b4c3036aa std::min/max are defined in <algorithm>
handle error in msvc12 when linking against msvc10 libs
2014-06-07 08:17:20 +02:00
Peter Kümmel
080fca85a8 build with mingw on Windows and Linux 2014-06-07 08:06:13 +02:00
Kornel Benko
046001e571 Make: improve detection of X11 with Qt 5
In collaboration with Scott Kostyshak:
With Qt 4 we could use Q_WS_X11, defined by FindQt4.cmake. In Qt 5,
there is no FindQt5.cmake. Instead we now define our own variable,
QT_USES_X11 by using class QX11Info available only on X11.
(http://qt-project.org/doc/qt-5/QX11Info.html)

The main consequence of this improved support is that now the keytests
can be run (ctest -R "keytest") when LyX is compiled with Qt 5.
Before, with Qt 5 we did not know if X11 was available, which is
needed by xvkbd, so the tests were not enabled. Note, however, that
many tests fail with Qt version 5.2.1 because there was a change in
the event handling mechanism in Qt that causes xvkbd to be unable to
pass capital letters (so case sensitive greps in the tests fail). This
needs to be investigated and reported.
2014-05-25 13:50:18 +02:00
Kornel Benko
f82883b097 Cmake build: Unify defines for spellchecker in config.h 2014-05-13 14:52:11 +02:00
Kornel Benko
6dc198ed6e Cmake build: Search for spell checking libraries unconditionally
New option: LYX_REQUIRE_SPELLCHECK. If set and no spellchecker found
  stop the compilation
  if not set, compile in many speckeckers as possible from the set
  of 'ASPELL', 'Hunspell', 'Enchant'
2014-05-13 12:31:37 +02:00
Kornel Benko
2ebcf38493 Cmake build: Install lyx*.desktop and lyx*.svg files in appropriate locations for unix 2014-05-09 10:04:42 +02:00
Kornel Benko
21541a07de boost, cmake: Turn off warning that signals are deprecated 2014-04-29 18:01:50 +02:00
Benjamin Piwowarski
d863088986 Revert "Objective-C compililation support with cmake and C++11"
This reverts commit c2e67a41ce.
2014-04-22 09:36:17 +02:00
Benjamin Piwowarski
6468cd97e3 When LYX_ASPELL is on, fails if not finding the library
Otherwise, this was triggering errors latter in the build process
2014-04-21 11:51:04 -04:00
Benjamin Piwowarski
14de3aa49b CMake install and bundling improvements (esp. OS X)
This patch improves the cmake bundling process:
- reworked bundle handling for OS X: only when installing resources are copied, otherwise
only the smallest bundle is built
- on OS X, the utility programs (tex2lyx) are now installed in the right location
- it removes some unneeded BUNDLE DESTINATION
- it provides a basic support for QT plugins inclusion
- it properly builds a disk image on OS X (only the background image is missing)
- it fixes the library paths for all executables (not only LyX)
- Use the COPYING file for cmake install license
2014-04-21 11:51:04 -04:00
Benjamin Piwowarski
c2e67a41ce Objective-C compililation support with cmake and C++11
This fixes an issue whe compiling with C++11 flags on: The
objective-C clang compiler produces an error. This patch waits
avoid including specific C++ flags and uses LYX_CPP_SPECIFIC_FLAGS
to store the confliciting flags (for the moment, just C++11).
2014-04-21 11:51:04 -04:00
Stephan Witt
b73c6462d6 simplify XCODE_VERSION check 2013-12-31 15:49:19 +01:00
Stephan Witt
130ad13dee avoid CMAKE_XCODE_ATTRIBUTE_GCC_VERSION assignment for Xcode 5.0+
it is not needed anymore and the current assignment is wrong in this case
2013-12-31 10:24:27 +01:00
Kornel Benko
499c5cfe57 Adapt cmake build to use c++11 features also for clang compiler 2013-12-15 11:41:28 +01:00
Kornel Benko
99c92de8aa CMake: allow compile-time C++ flags to be set
For developper only, therefore the variable is set to advanced.

Ideas from: Scott Kostyshak + Vincent van Ravensteijn
2013-12-05 12:00:02 +01:00
Kornel Benko
7033b15793 Cmake build. Use 2.0.0 git-tag to receive the number of commits.
This number is only used for created package name.
2013-11-30 19:53:30 +01:00
Scott Kostyshak
374cf6a39f CMake: allow compile-time C++ flags to be set
For example, one could run CMake as follows:
  cmake -DLYX_CXX_FLAGS_EXTRA="-Werror"

Thanks to Kornel.
2013-11-30 13:08:21 -05:00
Scott Kostyshak
9edb2c5ec9 Whitespace correction 2013-11-30 13:08:21 -05:00
Kornel Benko
95c4d7caf9 Cmake build tests: Make the tests for valid urls available to public
These tests already proved being valuable.
2013-09-06 15:03:47 +02:00
Kornel Benko
0a779e9543 Cmake build: Move default for man-pages to /usr/local/man
and at the same time make it configurable.
Until now it was hard wired to a subdirectory of installed lyx.
2013-09-06 14:56:31 +02:00
Kornel Benko
788e2b1ac8 Cmake build tests: Unify use of userdir
While some test runns lyx-exe, we need userdir be
different from default. All relevant tests should use the same directory.
2013-08-25 11:41:10 +02:00
Kornel Benko
22d52f5f08 cmake: Use provided gmo-files if platform lacks python or gettext tools.
Running lyx from the build-directory now searches for the gmo-files
first in the build dir and then in source dir
2013-06-02 11:38:27 +02:00
Vincent van Ravesteijn
a3c864102a CMake: Remove libintl 2013-05-30 22:10:01 +02:00
Vincent van Ravesteijn
4738ba0f1a qt5: Fix use of zlib using config.h 2013-05-14 17:34:53 +02:00
Vincent van Ravesteijn
900cbcd2ad qt5: Treat wchar_t as a builtin type
Qt5 is compiled treating wchar_t as a builtin type, while Qt4 did not. So,
we have to do the same.
2013-05-14 14:23:58 +02:00
Vincent van Ravesteijn
6f8a74791b Adjust CMake for Qt5 2013-04-23 21:45:49 +02:00
Kornel Benko
7dbd777146 cmake build: Add check for required QT-version 4.5.0 or higher
Since our own module does not respect the version parameter,
while the cmake provided does, also remove our FindQt4.cmake
2013-03-20 11:39:45 +01:00
Kornel Benko
0ea6654228 Cmake build: Creating a define for a header file found
need now only changes in the list of header files in ConfigureChecks.cmake.
2013-02-12 19:01:16 +01:00
Kornel Benko
ae04b1a18e Cmake build: Correct the previous commit.
We have to apply configure_file() twice, therefor the new file.
2013-02-12 17:40:32 +01:00
Scott Kostyshak
14d388e0db Add a space in CMake flag description 2013-01-30 06:53:00 -05:00
Kornel Benko
28f5fcd56b Cmake build: Enable to install also a debug version 2013-01-26 11:29:48 +01:00
Kornel Benko
f456260562 Cmake build:
New target: git-archive. It uses the archive comman of git to create
the complete source package.
This Target is only available if
        1.) there is a git command on this host
        2.) the lyx-source is under git control
2012-12-18 10:49:21 +01:00
Vincent van Ravesteijn
1b3871b302 Add custom target to run tests
This target can depend on the individual test projects and this makes sure
that the test projects are build before running the tests.
2012-12-17 22:26:14 +01:00
Vincent van Ravesteijn
0cd8c03d17 CMake: Put projects into subdirs
This patch puts all projects into subfolders (at least for MSVS). In this
way, there is a better overview (especially if the number of test projects
will be increasing).
2012-12-15 11:02:06 +01:00
Stephan Witt
471fdcd9d0 revert change 1dcb70a 2012-12-14 16:26:18 +01:00
Kornel Benko
81500fc99b Cmake build:
Move definitions of target ${_lyx} and ${_tex2lyx} to top-most directory,
to make them overall available
2012-12-14 12:23:17 +01:00
Stephan Witt
1dcb70a12f guard autotests with X11 window system check result 2012-12-13 20:54:13 +01:00
Kornel Benko
57b04ac7f4 Cmake build: First try to use autotests.
Many test are not running, but if changed the '-dbg xxx' to '-dbg any'
then all of sudden they pass ...
(The buffered output of lyx is often disrupted too early with 'kill -9',
so the expected data are not available for the appropriate test)
2012-12-11 15:17:04 +01:00
Kornel Benko
d91d6e3343 Cmake build:
Cleanup the use of path-variables
2012-11-02 13:33:22 +01:00
Kornel Benko
854b168d17 Cmake build:
Correct dependencies for version-info also at build-time
(not only at configure time)
2012-11-01 13:00:19 +01:00
Kornel Benko
28ebc59517 Cmake build:
Add option LYX_ENABLE_CXX11 to enable C++11 mode for gnu CXX compiler
2012-10-24 11:36:54 +02:00
Kornel Benko
f7680c696d Cmake build:
Added dependencies to target `test'. Now all the needed executables
are recreated prior to running tests if not already existant.
2012-10-21 16:58:45 +02:00
Kornel Benko
ed5dfa9cd7 Cmake tests:
Add tests the cmake-way. Now there is only _one_ target `test'
2012-10-21 12:05:50 +02:00
Kornel Benko
419f32df91 Cmake build:
Creating LYX_DATE dynamically at configure-time caused unwanted recompilation
of the whole directories (src + src/tex2lyx) because all the relevant objects
were dependent of a common file (flags.make in case of "Unix makefiles") which changed
accordingly.
There is now a new include (lyx_date.h, with only one definition)

Nothing changes for automake, since in this case LYX_DATE is defined in config.h
2012-10-15 22:50:39 +02:00
Kornel Benko
794e306c2e Cmake build:
Use ISO 8601 format for LYX_DATE, this makes it translated
2012-10-15 17:53:17 +02:00
Kornel Benko
75d63ad1f2 Cmake build: Use the timestamp of last commit (iff possible)
while idetifying the lyx-version.
2012-10-14 21:55:42 +02:00
Kornel Benko
20359572ed Patch from Benjamin Piwowarski
Just some comments on the patch:

- The executable name has to match the information in Info.plist (development/MacOSX/Info.plist.in and CMakeLists.txt).  The autoconf config/lyxinclude.m4 file has been modified to make it work with autotools.

- The process to build OS X bundle is to first add all the files to be included to the bundle when calling add_executable (src/CMakeLists.txt) and then by calling setting the source file property of each of these files (development/cmake/Install.cmake, l.14) so that the files are properly located into the bundle. This is also why Install.cmake has to be included two times in src/CMakeLists.txt (once to build the list of files, once to set the location of the list of files).

- in CMakeLists.txt there is a line
install(CODE "set(BU_CHMOD_BUNDLE_ITEMS 1)")
What it does is to fix the owner permissions within the bundle - this is necessary because some libraries are copied within the bundle and might be owned by root

- An empty qt.conf is included in the bundle so that QT does not try to link to other QT libraries (which will not be included in the bundle)

- In development/cmake/Install.cmake, some OS X specific files (*.sdef, qt.conf, *.icns) have to be included in the bundle

Benjamin
2012-10-13 09:53:20 +02:00
Kornel Benko
0c76f9c430 Cmake build: No header files in po-dir, so no need to include in cc commands 2012-10-05 12:27:15 +02:00
Kornel Benko
b1a409be97 Make package name be platform dependent 2012-09-21 15:09:46 +02:00