Commit graph

39 commits

Author SHA1 Message Date
Vladimir Golovnev (Glassez)
6fe063146f
CMake: Apply QBT_ADDITONAL_FLAGS on all systems 2019-08-02 19:32:56 +03:00
Vladimir Golovnev (Glassez)
3093751fa4
CMake: Fix compilation on Windows with MSVC 2019-08-02 19:32:53 +03:00
Vladimir Golovnev (Glassez)
38cf1fb3ee
Improve CMake configuration
Don't search for QtSingleApplication library.
Fix building on Windows with MinGW.
2019-07-21 16:41:17 +03:00
Chocobo1
4a90716843
Add override keyword to functions 2019-07-19 11:58:56 +08:00
Chocobo1
752d4b85ea
Remove compiler warning flags
Apperently nobody care about those warnings so just remove them and let
other more important warnings stand out.
2019-07-18 14:54:51 +08:00
Chocobo1
38b6ee9e75
Remove workaround for boost 1.39
... by raising minimum version to 1.40.
Bug report: https://svn.boost.org/trac10/ticket/3095
2019-06-23 11:09:05 +08:00
Mike Tzou
1831f71cc4
Merge pull request #10833 from Chocobo1/invokeMethod
Use functor based QMetaObject::invokeMethod
2019-06-22 11:24:47 +08:00
Prince Gupta
ece70daaa5 Fix CMake Windows compilation 2019-06-21 18:05:19 +05:30
Chocobo1
e47d7fe55c
Remove outdated defines 2019-06-21 01:48:55 +08:00
Eugene Shalygin
e590fff2fe cmake: restore out-of-source build
Qt translations have to be compiled in a shared library or executable,
and since we use static libraries for the components, webui translation
files have to be compiled into the main executable.
2018-10-14 11:06:20 +02:00
Eugene Shalygin
af7b40ecc2 Use proper include files in the QtSingleApplication find module.
Look for qtsinglecoreapplication.h when Qt5Widgets module was not found,
and qtsingleapplication.h otherwise. Fixes #9196.

This also removes Qt4 support from the QtSingleApplication find module.
2018-07-16 11:22:42 +02:00
Eugene Shalygin
0e655b4f9a Fix option name in winconf-xxx.cmake
The mistake was made by commit 7712d0ada0
2018-06-06 14:58:17 +02:00
Eugene Shalygin
fa770871e9 Refactor CMake build scripts
1. Use FeatureSummary module to show configuration results.

2. Invert option()/find_package() relationship: instead of
calling find_package(... REQUIRED) when option is set, rely on optional
find package call and PackageName_FOUND variable.

3. Refactor handling options that result in simple preprocessor defines
(actually copy the snippet from libtorrent) so that everything is done
in a single function call.

4. Populate target properties in order to get rid of
include_directories() calls.
2018-06-05 11:39:11 +02:00
Chocobo1
051ba4fa48
Comment out Werror flag in cmake script
Werror flag should be only enabled on developer's machine, not for
users using the product.
Also fix formatting.
2018-05-07 18:23:47 +08:00
Chocobo1
423511765a
Fix typo 2018-03-14 23:37:08 +08:00
Luís Pereira
058bad0af3 Make it build when using Clang under CMake
The pair Clang/qmake builds.
CMake compiler settings are more strict and it causes clang build to fail.
2018-02-26 19:53:39 +00:00
Eugene Shalygin
0ad5290389 cmake: do not use Qt5Widgets when locating QtSingleApplication. Closes #7551.
This fixes cmake builds with GUI disabled and system
QtSingleApplication. We rely on Qt5::Core instead of Qt5::Widgets.
2017-10-07 21:48:52 +02:00
Chocobo1
39b56ac598
Move NOMINMAX define 2017-08-29 13:39:01 +08:00
Eugene Shalygin
c614c66535 Install required plugins into bundle
Install platform and svg plugins into bundle. Update dependencies in
Travis.
2017-07-14 17:42:02 +02:00
Eugene Shalygin
74cecb1b6c Replace C-style casts with C++ ones 2017-05-29 17:25:42 +02:00
Eugene Shalygin
15ef4fcc56 cmake: fix FindSystemd.cmake
Apparently, recent version of CMake made PkgConfig stuff scooped and we
need to call find_package(PkgConfig) in FindSystemd.cmake too, the call
in FindLibtorrentRasterbar.cmake, that is always used first, is not
enough now.
2017-05-19 10:44:36 +02:00
Eugene Shalygin
c4e16aa820 cmake: set warning and error options
The set is far from perfect, but guards against common errors with GCC.
2017-04-29 13:30:28 +02:00
Eugene Shalygin
98415917c6 cmake: use environment variable LIB on Windows
Append its value to CMAKE_LIBRARY_PATH to simplify life of on Windows.
2017-04-27 14:34:30 +02:00
Eugene Shalygin
41a63718c9 cmake: use import libraries for Boost and OpenSSL in Libtorrent find module 2017-04-20 15:18:04 +02:00
Chocobo1
84cdd2e061 Bump _WIN32_IE in cmake build 2017-04-06 06:51:24 +08:00
Chocobo1
ca8ea73ddb Fix NTDDI_VERSION define
Fixup of 5958585e3a
2017-04-06 06:50:42 +08:00
Chocobo1
5958585e3a Add NTDDI_VERSION define 2017-03-28 17:38:04 +08:00
Eugene Shalygin
e96e14ca76 cmake: read version numbers from the version.pri file. Closes #6350. 2017-02-06 21:30:26 +01:00
Eugene Shalygin
eff13cc9eb cmake: fix boost components manipulations in FindLibtorrentRasterbar.cmake
The list of components which we pass to find_package() has to be semicolon
separated (i.e. to be the usual cmake list)
2017-01-21 20:11:48 +01:00
Eugene Shalygin
19c5e71a76 cmake: make some compile definitions global in Windows 2017-01-21 20:05:28 +01:00
Eugene Shalygin
13d9dea8ac cmake: make LibtorrentRasterbar::LibTorrent public dependency of qbt_base
If libtorrent include directory not in the compiler search path, we have
to pass it to all qbt targets, because session.h includes
libtorrent/version.hpp
2017-01-21 16:40:44 +01:00
Eugene Shalygin
0cb9884965 cmake: get and use only actual boost dependencies of libtorrent
With pkg-config we can get a list of Boost components from Libtorrent
dependencies and make qBittorrent depend only on these libraries in
turn. For Windows user may provide a custom list via
LibtorrentRasterbar_CUSTOM_BOOST_DEPENDENCIES variable or use generic
list which consists of date_time, system, chrono, random, thread. As a
note: in case of using fully C++11 build, the actual list contains only
boost system library.
2017-01-21 15:20:40 +01:00
Eugene Shalygin
7ed5c65b10 cmake: make prefix variables cached
This allows user to override their default value via -D cmake switch
2016-12-19 17:08:23 +01:00
Eugene Shalygin
f702d43973 cmake: mark libtorrent and qtsingleapplication include dirs as system 2016-05-01 02:54:37 +02:00
Eugene Shalygin
473e23f992 cmake: add imported target for Libtorrent 2016-04-18 21:23:03 +02:00
Eugene Shalygin
7c0b5818b1 cmake: add imported target for QtSingleApplication
This simplifies cmake code a bit: we remove if's and just generate
different target (imported or alias) with the same name and use it
unconditionally.
2016-04-17 01:07:15 +02:00
Eugene Shalygin
f050f15a0c cmake: fix Qt resources linkage. Closes #5080
Qt resource is innitialized by a static object constructor (see
https://wiki.qt.io/QtResources). When we put resources into a static
library, the linker removes that static objects and thus the resources
themselves. To correct that we append resources to the main executable
sources list. This is done via custom function qbt_target_sources which
knows where to read the executable' name.
2016-04-17 01:06:24 +02:00
Eugene Shalygin
5fbac5da5b cmake: fix library namaes for Qt5 version of QtSingleApplication
At least on Gentoo they start with 'Qt5', not 'Qt'
2016-03-09 23:32:35 +01:00
Eugene Shalygin
64daecb266 add basic cmake support 2016-02-29 12:53:43 +01:00