Commit Graph

296 Commits

Author SHA1 Message Date
Stephan Witt
7923ac5804 Amend last changes 7d66e37eb2 and 06fa1ef332 to rename the MYTHESLIB cmake lookup again 2020-08-04 12:12:07 +02:00
Stephan Witt
06fa1ef332 Amend last change 7d66e37eb2 to rename the MYTHESLIB cmake lookup 2020-08-04 12:00:14 +02:00
Kornel Benko
5529172fa1 Cmake build: Re-enable address sanitizer
Moved code because:
1.) Setting of LYX_CXX_FLAGS only has no effect,
2.) and setting of CMAKE_CXX_FLAGS was to late.
2020-07-15 14:24:49 +02:00
Kornel Benko
b299bd9730 Cmake build: Added option to override configure.ac default
Example:
Set some defaults for release with '-DLYX_ENABLE_BUILD_TYPE=release',
even if configure.ac specifies for instance 'development'.
2020-07-14 20:06:43 +02:00
Kornel Benko
25b4229c58 Amend2 26fa3b3d: Added support for sanity checks (Option LYX_ENABLE_ASSERTIONS) 2020-07-13 13:51:44 +02:00
Kornel Benko
bdaad972cf Cmake build: Select some defaults depending on LYX_BUILD_TYPE 2020-07-13 10:53:52 +02:00
Kornel Benko
690ad94f9e Amend 26fa3b3d, Cmake build: Move interpretation of configure.ac to own function
Use of posix packaging needs to be known prior to call to determineversionandbuildtype()
(Spotted by Scott)
2020-07-13 10:17:54 +02:00
Kornel Benko
26fa3b3d9d Cmake build: Move interpretation of configure.ac to own function
Created function determineversionandbuildtype() in development/cmake/modules/LyXMacros.cmake
2020-07-12 16:27:45 +02:00
Kornel Benko
40e071c7cb Cmake build: Improve checks for stdlib-debug 2020-07-11 12:43:17 +02:00
Kornel Benko
5f0ca8efe4 Cmake build: Do not overwrite the cache if nothing changes.
One of possibly more places .
2020-06-17 00:26:51 +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
5ec95f703c Cmake build: Prevent multiple configuration runs
Normally the sequence to compile is
1.) cmake <source> <some parameters>
2.) make

but since 'unset(var CACHE)' changed the cache, the following call to 'make'
triggered the configuration run.
2020-04-17 12:13:08 +02:00
Kornel Benko
dd154a5837 Cmake build: Fix use of LYX_ABS_INSTALLED_DATADIR
(Wrong display at configuration time. Also wrong value in created config.h)
2020-04-14 19:59:41 +02:00
Kornel Benko
af029d695f Cmake build: All directory variables should contain trailing '/' 2020-04-14 13:01:17 +02:00
Kornel Benko
b280fed1b3 Cmake build: Added 3rdparty creation of dt2dv and dv2dt
Works on linux, needs testing on Windows
2020-04-09 11:46:47 +02:00
Kornel Benko
278c26b1a6 Cmake tests: Amend 353295e4
Prevent also the command-line setting of LYX_ENABLE_VALGRIND_TESTS
for the cmake versions < 3.17
2020-04-07 14:16:07 +02:00
Kornel Benko
353295e499 Cmake tests: Start preparing for tests involving valgrind 2020-04-07 12:12:29 +02:00
Kornel Benko
c84fc5b40c Cmake build: Discard (unset) some variables if not used anymore 2020-04-07 11:48:45 +02:00
Kornel Benko
e74174c57a Cmake build: Build VERSION_INFO more cmake-like
Use LIST to add entries and convert the list later to a string
2020-03-26 15:48:01 +01:00
Kornel Benko
16802a7617 Cmake build: Amend 3df9525a, extend build info in Help>About
Add also the qt-version and paths of sysdir and the lyx executable
to the  build info
2020-03-25 17:50:58 +01:00
Kornel Benko
3df9525a13 Cmake build: Extend build info in Help>About
Added list of used cmake options and info about used compiler
2020-03-25 13:48:16 +01:00
Kornel Benko
4320e505a7 Cmake build: Remove deprecated policy warning 2020-03-01 15:36:41 +01:00
Kornel Benko
f152302275 Cmake build: Remove unused option
LYX_USE_FILEDIALOG is not used since af795b80
2020-02-22 21:13:43 +01:00
Kornel Benko
cd3f11e585 Cmake build: Amend 1c097e56, correctly respect the patch-level
Handle also the case of creating from tar-file _and_ having 'git' installed
2020-02-12 12:02:36 +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
1c097e5620 Cmake config: Respect the patch-level while creating package from tar/zip-source 2020-01-17 15:27:17 +01:00
Kornel Benko
ef4d21b684 Cmake config: Amend 43b81bec
Typo, causing wrong package creation
2020-01-17 14:59:49 +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
3a29ba795d Cmake build: Select use of interprocedural optimization
New cmake-option to explicit select/deselect the IPO
2019-12-17 13:59:52 +01:00
Kornel Benko
8181c88c28 Cmake build: Copy & paste error 2019-11-29 14:47:27 +01:00
Kornel Benko
5e436ce9e5 Cmake build: Consider for cmake versions <= 3.12 while searching for python
This partially reverts d17dfe6f
2019-11-28 21:51:47 +01:00
Kornel Benko
d17dfe6fb2 Cmake build: Replace use of deprecated module PythonInterp
Use find_package(Pytnon2 ..) and find_package(Python3 ...) instead

Patch from Patrick (pdvisschere@edpnet.be)
2019-11-28 15:09:11 +01:00
Kornel Benko
c9c86b4966 Cmake build: Remove warnings about deprecated policy CMP0069
Deprecated since cmake version 3.16
(Now explicitly enable/disable interprocedural optimization
if supported and not debugging)
2019-11-09 16:56:16 +01:00
Kornel Benko
e4d30dd7f6 Cmake build: Disable interprocedural optimization if debugging 2019-07-30 15:19:56 +02:00
Kornel Benko
e69a6661a5 Cmake build: Remove overwritten option 2019-07-13 23:56:38 +02:00
Jean-Marc Lasgouttes
1f90cd3b3f Make build: amend 6f2cd26103 (allow more compilers)
Allow gcc 4.7 and 4.8, but use boost regex

Allow visual studio 2015.
2019-06-29 16:48:06 +02:00
Kornel Benko
2a37ad9cce Cmake build: Amend e485102e, For python 3 require at least 3.5 2019-06-28 09:54:38 +02:00
Kornel Benko
6f2cd26103 Cmake build:Amend 44bbd0b0 and 22f59925
44bbd0b0: Get full version of gcc
22f59925: Remove support for gcc 4.6

Also Remove support for msvc without STD_REGEX
2019-06-13 09:18:40 +02:00
Kornel Benko
79d84fad0e Cmake build: Remove debug message 2019-06-12 19:31:46 +02:00
Kornel Benko
43c9ce2d90 Amend 03eadb1a, cmake-parsing of AC_INIT line changed 2019-06-12 19:27:58 +02:00
Kornel Benko
7d021a938c Cmake build: Use interprocedural optimization if possible
With gnu compilers this adds -flto and -fno-fat-lto-objects
to compiler and linker flags.
2019-04-22 18:53:49 +02: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
Scott Kostyshak
e9384cb8d0 Amend 23041f53: remove extra parenthesis 2018-10-27 19:16:36 -04:00
Kornel Benko
23041f53ea Amend 4459603, MSVC versions >= 1915 allow std::regex 2018-10-27 20:51:57 +02:00
Kornel Benko
4459603b61 Allow std::regex for MSVC10 2018-10-25 10:14:49 +02:00
Richard Kimberly Heck
1ae013f816 Try to make Windows use a versioned directory for the user dir.
(cherry picked from commit 802fd7932b713ee80bf384facd45f45a5ac22de4)
(cherry picked from commit 4478451ea1)
2018-09-30 13:49:30 -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
6343452a73 Cmake build: Disable possible warn about not known policy 2018-06-10 11:40:12 +02:00
Kornel Benko
72a2f92239 Cmake build: Simplify use of qt5 modules
According to this page:
	http://doc.qt.io/qt-5/cmake-manual.html
the way to replace use of qt5_use_modules() for module "_mod" and target "_target"
is to use
	1.) cmake_minimum_required(VERSION 3.1.0)
	2.) find_package(Qt5${_mod} CONFIG REQUIRED)
	3.) target_link_libraries(${_target} Qt5::${_mod})
The last one sets all reguired libraries, compile flags and needed includes for the ${_target}
2018-06-09 23:59:47 +02:00
Kornel Benko
d6b21e20e2 Cmake build: Adapt to compile with qt5.11
Since qt5_use_modules() is removed from QT5 (as spotted
by Jürgen Spitzmüller), we had to create own version
of this macro.
2018-06-09 16:52:15 +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
933502f991 Cmake mingw build: Get rid of a cmake warning regarding policy CMP0020
For explanation see the output of 'cmake --help-policy CMP0020'
2018-05-14 17:29:45 +02:00
Kornel Benko
aed458f007 Cmake tests: New test for the outliner with beamer
Test idea from Pavel Šanda
Move insets down and up, then compare with expected latex output.
2018-01-14 13:47:27 +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
Scott Kostyshak
c9817a4fb5 ctests: run URL tests at beginning
The URL tests can take a long time to complete. By running them at
the beginning, time can be saved when running the ctests in
parallel.

This saves around 10 minutes for me.
2017-12-24 01:02:12 -05:00
Kornel Benko
3b9705da19 Cmake build: Add option to use native file dialog also for linux 2017-11-26 18:50:53 +01:00
Uwe Stöhr
081a9035cf Win installer: big file cleanup
- update the file list in Makefile.am
- don't try to build it via CMake because this requires more than CMakeLists.txt. If it should nevertheless be built via CMake the .cmake files need to be rewritten from scratch
- remove unused and outdated files
- update  an SVG file
2017-11-20 21:05:16 +01: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
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
82246b5109 Cmake build: Unconditionally create many install targets
Previously one needed to use '-D_LYX_INSTALL=ON' to be able to install
some targets. This change only creates rules to make installation possible for
the underlying toolset.

The setting is still needed to create the rules for manuals, lokalizations and
win32 install scripts.
2017-09-25 10:29:40 +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
Kornel Benko
b5c2e02ebd Cmake build: Amend 2fe59ad, Ignore boost settings if we are using std-regex
Even in std-regex case we still need some includes from boost.
Therefore we also need an appropriate include path set.
2017-07-28 11:35:50 +02:00
Kornel Benko
2fe59adbc8 Cmake build: Ignore boost settings if we are using std-regex
External/included boost is only used for the component regex
2017-07-27 23:29:29 +02:00
Kornel Benko
0f881e202e Cmake build: Remove unnecessary duplication of c++ flags
Apparently cmake concatenates CMAKE_CXX_FLAGS to the Release and Debug flags
Also eliminated the mix of '-std=c++*' and '-std=gnu++*' flags
2017-07-27 13:33:17 +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
ba0492faee Cmake build: Try to figure out at configure time which qt version to use
Selecting -DLYX_USE_QT=AUTO (which is the default now) will try
to figure out which QT-version to use.

The qt4 version will be used if it is installed and the installed qt5-version is <= 5.6
Otherwise use qt5 if it is installed.
2017-05-02 14:12:41 +02:00
Kornel Benko
0935f94f0d Cmake build: Correct suffixing on non-gcc-compilers
If the value LYX_PROGRAM_SUFFIX is not handled, we have to use
LYX_PACKAGE_SUFFIX.
The naming 'PACKAGE' in our sources is misleading, as it is used
for the name of the debian/rpm packages as well.
2017-05-02 08:16:00 +02:00
Kornel Benko
d74c43e7a3 Cmake build: Remove use of policies which will be deprecated in near future
In order to prevent unpleasant surprises later.
(Cmake 3.8 already emits now warnings here.)
2017-04-30 18:12:13 +02:00
Kornel Benko
0f3b1539e8 Cmake build: Prefer using pyton3 over python2 2017-04-24 17:48:59 +02:00
Kornel Benko
fb79d6ed4f Cmake build: Enable std_regex over boost_regex again 2017-04-24 17:47:39 +02:00
Kornel Benko
5d4db9dcf5 Cmake build: Set cache variables correctly
In case of LYX_EXTERNAL_MYTHES==AUTO, the setting never made it into cache.
2017-03-25 12:43:53 +01: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
e78e58a7de Cmake build: Shuffle code around. 2016-09-12 11:04:14 +02:00
Kornel Benko
4f1095cdbc Cmake build: Specify the correct value of 'PACKAGE' define in config.h
This was wrong in case where no program suffix was allowed
Spotted by Scott.
2016-08-03 12:09:04 +02:00
Kornel Benko
7eea0b6fa8 Cmake build: Added code to compile with QT5.7
QT5.7 cmake config files explicitly instruct cmake to use `-std=gnu++11`.
This is not the same as is found by our FindCXX11Compiler.cmake,
which leads to compilation errors.
Here we overrule the setting.

Thanks to helpfull hand from Brad King <brad.king@kitware.com>
2016-07-15 10:37:18 +02:00
Scott Kostyshak
2b6f822bad Add CMake flag for keytests and disable by default
The keytests were previously enabled by default if the necessary
dependencies were found. They require a GUI and mouse so can
sometimes be annoying. Further, they are not currently reliable.
They are thus now disabled by default.
2016-07-13 04:52:46 -04: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
a51847f33f Cmake build: Split use of 3RDPARTY_BUILD to build individual libs
The split is now analogous to automake. The individual libs are handled
analogously to already handled boost.
automake config setting			cmake config settings
--with-included-iconv			-DLYX_EXTERNAL_ICONV=OFF
--with-included-zlib			-DLYX_EXTERNAL_Z=OFF
--with--included-hunspell		-DLYX_EXTERNAL_HUNSPELL=OFF
2016-07-05 16:07:03 +02:00
Georg Baum
5ef180842c Ensure that iconv and zlib are always found
If the included thirdparty libs are requested, use them, even on unix. This is
consistent with autotools (but the recommended way is of course to use the
system libs). If the included thirdparty libs are not requested then try to find
libiconv and zlib also on windows. This will lead to an error unless the libs are
found via manually added include and link paths, but this is wanted since
libiconv and zlib are not optional.
2016-07-02 11:09:26 +02:00
Georg Baum
03cfeae00a Make LyX compiled by MSVC 2015 run on Vista again
Patch and tests from Dima Ruinskiy, comments by me. For details see discussion
in bug 10186.
2016-07-01 22:05:55 +02:00
Georg Baum
48fd76d4bf Fix windows dependencies download
The paths and servers have changed, and a MSVC 2013 version is not provided
anymore.
2016-06-19 12:47:30 +02:00
Georg Baum
e307944d18 Require gcc 4.6
See also 5de30b1210
2016-06-15 22:04:51 +02:00
Kornel Benko
a71fba47ab Cmake windows build: Discard use of configCompiler.h.msvc
This file doubles the struggle when inventing new configuration tests.
Hopefully we get soon a confirmation if the withdraw is OK.
2016-06-15 11:29:09 +02:00
Kornel Benko
48bad4b581 Cmake build: Correct wrong comment 2016-06-11 12:44:15 +02:00
Kornel Benko
24a7dd45dc Cmake build: Determine availability of 'std::regex' if using clang compiler 2016-06-11 12:23:33 +02:00
Kornel Benko
f792837531 Cmake build: Finetune some destination data paths on UNIX 2016-06-10 13:40:38 +02:00
Georg Baum
2047ea5eb4 Replace Boost.Signals with Boost.Signals2
Boost.Signals is deprecated. This fixes bug #9943.
The only thing left to do is to rewrite (or get rid of) the boost -mt test
in config/lyxinclude.m4 not to use signals anymore.
2016-06-09 22:25:34 +02:00
Kornel Benko
8019732b39 Cmake build: Check for QPA_XCB when QT_USES_X11 is known
Since QT_USES_X11 is determined in ConfigureChecks
we have to check after this call
2016-06-08 09:21:48 +02:00
Georg Baum
273c67d8aa Require a C++11 compiler
As discussed on the list. If no C++11 compiler is found configuration stops
with an error. There are now unneeded parts of boost, the will be removed in
a second commit.
2016-06-07 20:34:52 +02:00
Kornel Benko
9dd695b17a Cmake build: Correct some installation paths 2016-06-07 14:38:20 +02:00
Kornel Benko
06539caccb Cmake build: Refactor determination of destination paths. 2016-06-06 08:29:07 +02:00
Kornel Benko
b5c87f2963 Cmake build: Set new installation paths
For a suffixed version (with suffix 2.3) and installation dir (/usr/local)
the new paths are:
binary -> /usr/local/bin
system-lib -> /usr/local/share/lyx2.3
fonts -> /usr/local/fonts/truetype/lyx2.3
manuals -> /usr/local/man/man1
locales -> /usr/local/share/locale
tex -> /usr/local/texmf/tex/latex/lyx2.3
2016-06-05 22:59:13 +02:00
Kornel Benko
7c0eba4d75 Cmake build: Allow user defined suffix for program files 2016-06-05 16:26:59 +02:00
Georg Baum
c2433d8b8f Implement gcc version check for cmake 2016-06-05 15:54:29 +02:00
Kornel Benko
4aa88e982a Use guard for QT5/XCB also for cmake build.
See commit d4428ceb81
from Enrico Forestieri
2016-04-09 11:53:55 +02:00
Kornel Benko
a413d667ca Set C++11 option defaulting to 'AUTO' as it is on autotools too.
Nothing changes for already cached values.
With fresh build-dir and in 'AUTO'-mode we try to determine if the c++ compiler
is able to use this feature.
2016-02-11 09:03:07 +01:00