Commit Graph

792 Commits

Author SHA1 Message Date
Kornel Benko
40e071c7cb Cmake build: Improve checks for stdlib-debug 2020-07-11 12:43:17 +02:00
Kornel Benko
76db479c07 Cmake build: Change the destination of fonts
Select the lyx-fonts-directory such that font-config can find the dat
2020-06-11 19:06:21 +02:00
Kornel Benko
392aaa11ac Cmake build: Add trailing '.'
Cpack in the cmake 3.18-version creates invalid control file
containg empty line. 'dpkg' chokes on this control file.
2020-06-10 17:11:36 +02:00
Kornel Benko
ed665a0333 Amend 2d48072e: Get rid of Qt resources
Remove the cmake handling too
2020-06-07 12:07:58 +02:00
Juergen Spitzmueller
33e74e5117 Having two folders just differing in case is not such a good idea.
See #11882
2020-06-06 13:56:46 +02:00
Kornel Benko
b71fb0d0f6 Cmake installs: Clean up some installs 2020-06-05 13:00:00 +02:00
Kornel Benko
c7dbc201df Amend 9c863039: Cmake build: Adapt handling of c++ standards to new Visual C++ 2019
Apparently the use of "/std:c++20" is too new for our sources.
2020-06-04 18:01:49 +02:00
Kornel Benko
8b81adbbec Cmake build: Add some missing language-specific files for installation
Preparing for possible addition af language file like zh_CN or pt_BR
in the examples directory
2020-06-03 21:44:42 +02:00
Kornel Benko
fc39c3b48b Cmake build: Prohibit use of external boost if using libstdc++ in debug mode
We are using the compiler falgs _GLIBCXX_DEBUG and _GLIBCXX_DEBUG_PEDANTIC
See https://opensource.apple.com/source/gcc/gcc-1640/libstdc++-v3/docs/html/debug.html
2020-05-27 11:35:48 +02:00
Kornel Benko
9c863039b6 Cmake build: Adapt handling of c++ standards to new Visual C++ 2019
More or less suggested by Thibaut Cuvelier's switch to Visual C++ 2019
2020-05-05 13:49:50 +02:00
Kornel Benko
3f89dd0b48 Cmake build: Distinguish between PROGRAM_SUFFIX and LYX_VERSION
For instance: program suffix may be "", but lyx version is still "2.4"
2020-04-19 09:45:32 +02:00
Kornel Benko
0135682fca Amend(1) 689f26d2: Add default path to server pipe (cmake build)
Added handling for cygwin and win32
MacOSX is unchanged, Stephan could you look at it?
2020-04-18 09:06:56 +02:00
Kornel Benko
af029d695f Cmake build: All directory variables should contain trailing '/' 2020-04-14 13:01:17 +02:00
Scott Kostyshak
9715d3504c cat.py: fix Python deprecation warning
This commit fixes the following warning:

  DeprecationWarning: 'U' mode is deprecated

Removing 'U' has no effect with Python 3 [1]:

  There is an additional mode character permitted, 'U', which no
  longer has any effect, and is considered deprecated. It previously
  enabled universal newlines in text mode, which became the default
  behaviour in Python 3.0.

[1] https://docs.python.org/3/library/functions.html?highlight=open#open
2020-03-20 10:22:47 -04:00
Scott Kostyshak
f1694db496 CMake build: find enchant 2.x binary and lib
For example, see the Fedora file lists for the package
enchant2-devel [1] as well as the Debian Sid file lists for the
packages libenchant-2-dev [2] and enchant-2 [3]. The packages for
Ubuntu 20.04 are similar. Our autotools build has had support for
finding enchant 2.x since 71977769.

Searching for enchant-2 first is consistent with what we do for
autotools (see 1ae537c5).

This commit is related to #10986.

[1] https://www.lyx.org/trac/ticket/10986#comment:28
[2] https://packages.debian.org/sid/amd64/libenchant-2-dev/filelist
[3] https://packages.debian.org/sid/amd64/enchant-2/filelist
2020-03-13 10:07:05 -04:00
Kornel Benko
7f0efc5165 Cmake build: Add evince_sync-files to be installed under the scripts dir 2020-03-01 16:48:14 +01:00
Kornel Benko
43dfd12fd7 Cmake build: Files already removed, but in 'git status' still present.
This is a try to really remove them.
2020-02-15 10:11:28 +01:00
Kornel Benko
9fdc00fe2a Cmake build: Remove cmake warnings about mismatched values of FindPackageHandleStandardArgs() 2020-01-27 10:44:14 +01:00
Kornel Benko
43b81becc6 Cmake config: Rename some variables to match the ones used by automake
LYX_RELEASE_VERSION renamed to LYX_RELEASE_VERSION
and got the new value of
LYX_RELEASE_PATCH
from configure.ac too
2020-01-17 14:25:57 +01:00
Kornel Benko
9d0548e877 Cmake build: Try to find hunspell.hxx for linunx _and_ for OSX 2019-12-04 20:23:27 +01:00
Kornel Benko
201acf0279 Cmake build: Correct configuration if set LYX_BUNDLE=ON
Patch by Patrick (pdvisschere@edpnet.be)
Citing:
With some changes I could get it to work (patch included). One will also
have to define the locations of the Qt5-plugins and Qt5-libs folders
(`QT5_PLUGINS_DIR` and `QT5_LIBRARY_DIRS`).

Maybe not all plugins/imageformats are used/needed by lyx, but they are
all copied now, except for `_debug` versions which are excluded.
Starting with Qt-5.12 it seems not possible anymore (or at least not
easy) to link to the `_debug` versions of the qt5-frameworks (with
cmake). And installing them into the bundle also does not work. So right
now this is not a big loss.
2019-11-30 11:19:10 +01:00
Kornel Benko
350a9daf56 Cmake build: Add LINK_LIBRARIES to check for HUNSPELL CXX ABI. Needed by XCode
The trick with faking the link command does not work with XCode
see: https://cmake.org/pipermail/cmake/2010-May/037132.html

Spotted by Patrick (pdvisschere@edpnet.be)
2019-11-29 13:49:02 +01:00
Kornel Benko
9de4b9ab34 Cmake build: Remove unneeded hunspell path from configure test
Spotted by Patrick (pdvisschere@edpnet.be)
2019-11-28 14:31:26 +01:00
Kornel Benko
58ed976dd3 Cmake build: Install executables as programms
Patch from Patrick (pdvisschere@edpnet.be)
2019-11-27 15:05:44 +01:00
Uwe Stöhr
d995ea684f build5-2017.bat: add new script to compile using MSVC 2017 2019-10-20 23:11:17 +02:00
Kornel Benko
0362ec022b Cmake build: Correct display cmake options
The change allows to display options whose string-length
is less than 10 characters.
The previous setting truncated the string to 4 chars,
which is too few for a string like e.g. "NATIVE".
2019-07-14 11:12:55 +02:00
Kornel Benko
cbcf57ec13 Amend f4254e69: Use correct sequence in set-command 2019-06-24 12:56:51 +02:00
Kornel Benko
f4254e6999 Cmake windows build: Fix a cache variable
Thanks to Jürgen Womser-Schütz
2019-06-24 10:36:37 +02:00
Kornel Benko
c5fa5232bb Cmake build: Removed some cmake warnings 2019-03-26 10:03:18 +01:00
Kornel Benko
4da338e550 CMake build: Rename HAVE_LONG_LONG to HAVE_LONG_LONG_INT 2019-03-21 16:12:02 +01:00
Kornel Benko
afccaae48a Amend 601244ba92: Use HAVE_LONG_LONG_INT instead of LYX_USE_LONG_LONG
Cmake changes
2019-03-21 15:17:24 +01:00
Kornel Benko
a410b0d698 Cmake build: Amend(2) d3ec77c6: Reorganize templates and example folders
Install files from these new directories
2019-03-19 14:36:14 +01:00
Kornel Benko
016c7d6260 Amend 4028eefe: Make callstack printing useful and optional
Added the option to cmake too
2019-02-26 09:50:58 +01:00
Kornel Benko
5e287500bf Cmake build: Fix some warnings with cmake3.13
Wrong set() syntax
2019-02-05 12:27:15 +01:00
José Matos
3f03f0a447 Move all python shebangs from /usr/bin/env to python3.
The change is only relevant to development as all the call to python scripts is done
calling C++ os::python that invoques the appropriate python version.

The change is two fold, on one hand remove all the uses of /usr/bin/env for python.

On the other hand rename all the calls to python from python to python3 making it explicit
and being compliant with PEP 394 -- The "python" Command on Unix-Like Systems:
https://www.python.org/dev/peps/pep-0394/

Remove the sheebang from src/graphics/GraphicsConverter.cpp because it is not necessary.

Some small whitespace changes.
2018-12-29 19:14:41 +00:00
Richard Kimberly Heck
9794bf5abc mingw build script 2018-09-30 13:50:36 -04:00
Richard Kimberly Heck
cbc4e2399a Copy over cmake packaging updates from 2.3.x. 2018-09-28 22:18:15 -04:00
Stephan Witt
1bf4d7b0fc Extend Clang compiler detection to cover Apple CLang
CMake 3.0 and above recognize that Apple Clang is a different compiler than upstream Clang and so it gets a different CMAKE_CXX_COMPILER_ID.
2018-06-12 22:43:03 +02:00
Kornel Benko
08afacc239 Cmake build: Adapt use of some variables
1.) Rename LYX_PATCH_VERSION to LYX_RELEASE_VERSION.
  This matches the use in automake.
2.) Don't display LYX_DATE at configure time.
  This value is evaluated later at build time
2018-06-03 09:16:55 +02:00
Kornel Benko
bda9e38ade Amend d7020ea: Add the warn when using system hunspell in stdlib-debug mode also for cmake 2018-04-09 17:13:52 +02:00
Kornel Benko
b7c8033548 Cmake build: Check for correct hunspell only if used 2018-03-30 19:40:08 +02:00
Kornel Benko
4cfc5bb75d Amend 8774ad5, Adapt to new hunspell C++ ABI for cmake
Replace CHECK_CXX_SOURCE_COMPILES() with TRY_COMPILE()
Discarding the link-stage mimics the behaviour used by automake.
Now the testsource is compiled regardless if hunspell
is external or not.
2018-03-30 14:10:45 +02:00
Kornel Benko
8774ad51c0 Adapt to new hunspell C++ ABI for cmake
The compile test for 3rdparty hunspell is omitted,
because the macro check_cxx_source_compiles() tries also to link.
But at the time of the check, the required library is not there.
2018-03-29 22:53:59 +02:00
Kornel Benko
454f56b5f2 Cmake build: Allow cross-compiling with mingw again
1.) The check for "QT_USES_X11" expects the created application
  to run, but the '.exe' file does not run on linux.
2.) Don't use megered build anymore, it is not faster
  on multi-processor machines anyway
2018-02-10 11:21:08 +01:00
Jean-Marc Lasgouttes
63a4e82874 Add support for enchant 2.x
As of enchant 2.x, it is required to create a Broker instance instead
of relying on a static one provided by the library.

Add autoconf and cmake (courtesy of Kornel) tests that check whether
one can indeed instantiate a Broker object, and act on the result in a
new broker() helper function.

Fixes bug #10986.
2018-01-30 12:11:22 +01:00
Uwe Stöhr
dceb7e393d build5*.bat: update to Qt 5.9.4
- also adjust build5-2015-x64.bat
2018-01-24 01:18:32 +01:00
Kornel Benko
03b6ee9f06 Cmake build: Added handling for lyxrc.dist for Apple and Unix
Also added include path for magic.h, as found out by Joel Kulesza
2018-01-03 15:04:21 +01:00
Uwe Stöhr
95bcff9924 unix2dos.py: make it ready for python 3
fixes bug #10838
2017-12-08 02:08:16 +01:00
Kornel Benko
1844d22221 Cmake build: Don't try to convert non-lyx-files.
Since they are not supposed to contain versioned strings like LYX_DIR_VER,
it is sufficient to copy them instead.
Besides, they also may be non-utf-8 coded, which would also break the conversion.
2017-11-28 19:07:24 +01:00
Uwe Stöhr
bf12cebdc0 Win installer: update to Qt 5.9.3 2017-11-24 00:16:23 +01:00
Kornel Benko
6011d6cdca Cmake build: Install subscript.sty only for WIN32 (using MikTeX) 2017-11-05 17:06:38 +01:00
Kornel Benko
51e32a36d6 cmake documentation handling: sort out encoding problems.
Let srcipt work under Python2 and Python3,
also if the locale is not set to utf8.

Patch from Günter Milde, sort of cherry-pick from 9086db662d
2017-10-29 09:49:39 +01:00
Kornel Benko
65deb30c24 Cmake doc creation: Python is choking on '\\' 2017-10-17 17:12:29 +02:00
Kornel Benko
f3c8884eee Cmake doc creations: Correct indentation 2017-10-17 12:35:57 +02:00
Kornel Benko
a68ef98103 Cmake doc creations: Setting environment PYTHONIOENCODING
This should force the python executable to use the desired encoding.
The command is moved to a wrapper script to be able to set the environment
at make-run-time.
2017-10-17 12:28:36 +02:00
Uwe Stöhr
3835b473c7 ReplaceValues.py: partly revert commit f075f8ad
we need a string output not a byte
2017-10-17 00:23:19 +02:00
Uwe Stöhr
f075f8ad0a ReplaceValues.py: make the file compilable with Python 3
see the mailing list thread "compilation of LyX 2.3 fails with Python 3.6.2" for details
2017-10-16 23:29:57 +02:00
Uwe Stöhr
b7f7c857ad Win installer: update Qt
- Qt 5.6.3 uses a different path name scheme
- one DLL was removed in Qt 5.6.3
2017-10-15 16:50:20 +02:00
Kornel Benko
847c68960a Cmake build: Needed variable for creation of debian package
The variable CPACK_DEBIAN_PACKAGE_RELEASE has to be in the form
of "^[A-Za-z0-9.+~]+$". We will use the abbreviated commit revision for now.
Without this change cmake 3.10 emits error.
2017-10-07 10:47:17 +02:00
Kornel Benko
336f94d12f Cmake build: Don't use temporary doc-files as source for installation 2017-10-05 20:16:52 +02:00
Kornel Benko
c2eb1a1a72 Add suffixed lyxconvert to cmake build.
This should amend f93ec4a, but is not tested on apple
2017-10-02 02:00:47 +02:00
Kornel Benko
854d7e1619 Windows only: A try to compile with LYX_CONSOLE again
The use of the value "FORCE" was wrong anyway, since LYX_CONSOLE
is of type "BOOL".
2017-08-18 12:07:03 +02:00
Jean-Marc Lasgouttes
9fe8190364 Make "devel mode" configurable at run time
Traditionally LyX behaves differently when the directive DEVEL_VERSION
is defined at compile time. This covers
* more detailed description of current position in status bar
* the help files are open in read/write mode
* more detailed debug output in the View Source panel

This patch introduces the new function devel-mode-toggle that allows
to use devel mode in stable releases, and vice versa.

The information is saved in the session file. The default is to
disable devel mode.

Remove all traces of DEVEL_VERSION in autoconf and cmake
2017-07-24 22:00:44 +02:00
Kornel Benko
12a2565b97 Cmake build: Use the same destination for lyx-tex-files as in automake 2017-07-14 11:24:20 +02:00
Kornel Benko
e23e65a973 Cmake build: Install lyx-provided fonts to where GuiFontLoader.cpp expects them 2017-07-10 13:17:29 +02:00
Kornel Benko
acf8df28b3 Sort images file list also for cmake
This is not needed for recent cmake versions, but since we expect
also older cmake version be used, sort the list nevertheless.
See https://reproducible-builds.org/ for why this matters.

Amends b8e3615
2017-06-27 19:18:24 +02:00
Uwe Stöhr
50f0ae9ecd build5-2015.bat: fix a path 2017-05-13 19:19:18 +02:00
Uwe Stöhr
5120c25872 build5-2015.bat: fix build script for current CMake releases
- since CMake 3.5 the path to the cmake.exe is no longer by default written to Windows' PATH variable. Therefore this has to be done in the script.

- Windows path can contain spaces (CMake's default installation folder does) so we must use quotes around the paths

- set the CMAKE_PREFIX_PATH variable
2017-05-10 01:38:48 +02:00
Uwe Stöhr
18bdb38f30 build5-2015.bat: the option LYX_ENABLE_CXX11 is no longer available in CMake
- also use a boolean setting for LYX_CONSOLE, see bug #10658
2017-05-09 22:08:22 +02:00
Kornel Benko
0f798d6675 Cmake build: Allow numbers in lyx-suffix too
That way we can use '-DLYX_SUFFIX_VALUE=123.456'
2017-04-30 17:01:31 +02:00
Uwe Stöhr
d318a8a6f2 build5-2015-installer.bat: we use Qt 5.6.2 2017-04-25 01:43:23 +02:00
Juergen Spitzmueller
52019917f4 Split external_templates to individual *.xtemplate files
This makes it easier to add new templates or change existing ones
in the user directory.

Fixes: #3983

The CMake changes should be double-checked.
2017-03-26 15:32:01 +02:00
Kornel Benko
5d3d26b024 Cmake build: Adapt handling of mytheslib to automek behaviour
The added cmake-parameter is:
  -DLYX_EXTERNAL_MYTHES=<value>
where <value> is one of
  AUTO	(Default) Search first on system for mythes (lib and include)
  ON	Use installed only (errors if not installed)
  OFF	Compile the provided source in 3rdparty
2017-03-07 14:27:08 +01:00
Kornel Benko
15babdc0f1 Amend 0e50ad8 'move mythes sources to 3rdparty' for cmake build. 2017-03-06 19:31:23 +01:00
Kornel Benko
c6314fc7d0 Amend b5416928. Cmake configuration for QT5.8 2017-02-23 00:18:52 +01:00
Kornel Benko
7b57bea5d5 Cmake build: Missed to install citeengines dir in commit cf3f481 2017-01-13 17:18:25 +01:00
Kornel Benko
f4c3dc6668 Add the perl-mode-line for emacs to perl scripts 2016-12-03 11:39:28 +01:00
Kornel Benko
ff0c95aba6 Cmake build: Prepare for hardening use of external programs 2016-11-22 16:51:44 +01:00
Uwe Stöhr
10e90ad78c Win build: fix a typo 2016-10-16 14:33:18 +02:00
Kornel Benko
5e3ceee8d5 Cmake package: Correct description.
The new cmake 3.6 now also inserts correctly
this file into its control-file. But the syntax of the control-file
expects the description lines be indented by a space.
Also empty lines (only spaces) are not allowed.
2016-09-23 13:39:23 +02:00
Guillaume Munch
02b747396e Commands to select the posix variant for the mingw cross-compilation script
The win32 thread model of gcc does not support the <thread> and <mutex> headers
yet.
2016-08-12 21:46:26 +01:00
Kornel Benko
5f5c966b19 Cmake build: Ignore also files with extension .patch --
These files should not be installed.
2016-08-08 21:23:20 +02:00
Kornel Benko
2d49342ce3 Cmake build: Amend 41e409f8: Use std::call_once only if it is actually available 2016-08-07 11:32:53 +02:00
Kornel Benko
fa85bf9b59 Cmake build: Added check for pythons polib module
Idea stolen from http://public.kitware.com/pipermail/cmake/2011-January/041666.html
2016-07-24 11:20:08 +02:00
Kornel Benko
59ac7ce660 Cmake build: Add needed libraries if using QT5_Extras
Commit cb0c881 does this already for automake.
2016-07-11 19:08:11 +02:00
Uwe Stöhr
1f6e2c323e build4-2010.bat: remove outdated script
building with MSVC 2010 won't be possible with LyX 2.3
2016-07-11 02:12:36 +02:00
Kornel Benko
8a15df6d65 Amend cb0c881 2016-07-10 22:14:08 +02:00
Enrico Forestieri
cb0c881b02 Fix paste of selection to (unfocused) external applications
With both Qt4 and Qt5, when using a click-to-focus policy, the first
attempt to paste a selection by middle mouse in an external application
which has no focus may fail. It is not clear why this succeeds for some
applications and fails for others, but refreshing the timestamp of the
selection request cures the issue. The cmake part is by Kornel.

See also this thread:
http://thread.gmane.org/gmane.editors.lyx.devel/162491
2016-07-10 19:31:32 +02:00
Kornel Benko
396b55dd51 Cmake build: Mimic changes done in autoconf at f70dd65 2016-07-08 10:58:32 +02:00
Uwe Stöhr
edbc91a6f9 remove 2 outdated build scripts
LyX 2.3 cannot be compiled with MSVC 2010
2016-07-02 19:40:18 +02:00
Georg Baum
3c56e7c0eb Fix MSVC C++11 detection
The old version with empty flag did not enter the loop at all, so we have to
use a workaround. Thanks Uwe for testing.
2016-07-02 18:26:08 +02:00
Georg Baum
987dd84461 Do not use --std=c++14 for MSVC
MSVC does not need a special flag to specify the standard. Using --std=c++14
produces a warning, but compilation succeeds, so the old code did mistakenly
choose --std=c++14 for MSVC.
2016-07-02 12:42:04 +02:00
Georg Baum
e49d59dafc Fix std::regex detection for older gcc
Older gcc versions (e.g. the first one which has usable std::regex: gcc 4.9)
require the --std=c++11 flag to be set. Otherwise std::regex is not made
available. Therefore we need to keep the flag in the loop.
2016-07-02 12:39:08 +02:00
Uwe Stöhr
f1818679ce CMAKE: update path to Qt 5.6.1 2016-07-01 01:39:38 +02:00
Georg Baum
c7c9744368 Adjust dep path in build batches
Another location where paths are stored...
2016-06-19 13:15:50 +02:00
Georg Baum
c737f1cddf Remove InsetMathXYArrow
This was dead code that did never work, and most of it was boilerplate that
you can steel in 15 minutes from any existing math inset. Apart from that it
did contain a pointer to InsetXYMatrix which would create the same problems
we saw with the macros.
2016-06-16 20:39:32 +02:00
Georg Baum
f8990ef469 This is LyX 2.3 2016-06-16 20:20:59 +02:00
Kornel Benko
0eb0a3d94d Cmake dist: Expand the list of not distributed files. 2016-06-15 10:21:18 +02:00
Kornel Benko
2da1c956e4 Cmake build: Check for make_unique and PATH_MAX symbols added. 2016-06-12 19:56:31 +02:00
Kornel Benko
24a7dd45dc Cmake build: Determine availability of 'std::regex' if using clang compiler 2016-06-11 12:23:33 +02:00