Commit graph

46 commits

Author SHA1 Message Date
Chocobo1
03da68b1cf
Add support for unit testing
* Downgraded macOS CI to Qt 6.2.0 due to a bug in Qt Test module
* Revised cmake build scripts
* For now, only building via cmake is supported

PR #17338.
2022-07-10 13:20:27 +08:00
Prince Gupta
96965ae347
CMake: Call UIC on the .ui files manually
Fixes unnecessary recompilation when editing GUI files.

PR #16151.
2022-01-26 14:44:44 +03:00
Vladimir Golovnev (Glassez)
86b1ac5d7c
CMake: Allow to build with Qt6 2021-10-02 09:23:49 +03:00
Chocobo1
e006538514
Fix cmake script (#15309)
Fix up 138c911ef4.
2021-08-11 13:26:15 +08:00
Chocobo1
138c911ef4
Add compile definition to indicate using of libtorrent 2.0 (#15297)
The compile definition is temporary which will be removed when qbt
ditches libtorrent 1.x.
2021-08-08 13:27:22 +08:00
Chocobo1
7d7f967d5e
Detect incompatible libtorrent v2 versions in build systems
Although the detection is working, the error message in autotools is not
perfect, i.e. it would only mention valid range for libtorrent v1 and it
shouldn't be a problem since v2 support isn't fully ready yet.
2021-07-31 16:59:37 +08:00
Vladimir Golovnev (Glassez)
383eaf44ac
Implement DBResumeDataStorage class 2021-05-01 12:30:53 +03:00
Vladimir Golovnev (Glassez)
35032d7eed
Don't use "Qt Mac Extras" module
"Qt Mac Extras" module is removed in Qt6.
2021-04-14 15:41:46 +03:00
FranciscoPombal
6590915b15 Update minimum depedency versions 2020-12-04 12:23:22 +00:00
Chocobo1
0539c816ae
Set compression rate for rcc targets
This follows our current setting in src.pro.
2020-09-18 14:49:17 +08:00
Chocobo1
6880e03145
Remove compile requirement for boost::system
boost::system is not a dependency for our project.
2020-09-18 14:48:54 +08:00
FranciscoPombal
46123b9989 CMake: overhaul and improve scripts
- Bump minimum required version and
make use of more modern language features
- Rely more on target_...() commands to establish dependency
relationships between targets rather than directory property commands
- Improve libtorrent package discovery
- Enable and handle application features more explicitly
- Improve user-facing output
- Fix various compilation issues on Windows (MSVC and MinGW) and macOS
- Improve handling of translations
- Add explanatory comments where relevant
- Make CMake scripts fully independent of qmake files/details
- Remove old functions/macros
2020-09-17 13:13:26 +01:00
jagannatharjun
c7da78ff1d Fix invalid comparison for Boost version in CMake
This reduces compile time more then half when compiled against Boost
version greater than 1.60
2020-07-17 14:00:39 +05:30
FranciscoPombal
a1809a43f8 Add QT_NO_CAST_FROM_BYTEARRAY to compile definitions
Prevents bugs like #13029, even if the ternary expression operands
have different types.
2020-06-23 11:45:38 +01:00
Vladimir Golovnev (Glassez)
a22f921941
CMake: Fix optional features handling 2020-05-02 20:59:26 +03:00
Vladimir Golovnev (Glassez)
ad0ee0cd36
CMake: Enable/disable GUI application via option 2020-05-01 17:03:01 +03:00
Vladimir Golovnev (Glassez)
642bf7b8a6
CMake: Don't split GUI code into several libraries 2020-05-01 17:03:00 +03:00
FranciscoPombal
d593d6baa1 CMake: Enforce minimum C++ mode support 2020-04-28 15:50:16 +01:00
NotTsunami
b21ed0063b CMake: Fix WebUI checks
When the CMake system was last revamped, the configure variable was
changed from WEBUI to DISABLE_WEBUI, but we are still checking
against WEBUI. This behavior was changed in fa770871e9
2020-01-19 15:08:45 -05:00
Chocobo1
0d5b0b9542
Replace deprecated macro
Q_OS_MAC is deprecated and the replacement is Q_OS_MACOS.
2019-09-05 20:16:18 +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
Vladimir Golovnev (Glassez)
c7f3693ad1
Implement "Application instances manager" 2019-06-30 20:02:46 +03:00
Chocobo1
c33284fa8c
Add compile flag to show Qt deprecation warnings 2019-02-28 12:01:36 +08:00
Vladimir Golovnev (Glassez)
6d6af8e70d
CMake: Check for required libtorrent version 2019-01-11 15:13:33 +03:00
Chocobo1
8a6cac8338
Make OpenSSL a direct dependency 2018-12-05 13:28:42 +08:00
Eugene Shalygin
019da6a98c
Merge pull request #9509 from zeule/cmake-cxx14
cmake: use C++14 when available
2018-11-07 14:07:16 +01: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
141af072b9 cmake: use C++14 when available
Libtorrent does the same and we have to follow since
its ABI depends on the C++ standard version.

Partially closes #9485.
2018-09-16 18:29:15 +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
Nick Korotysh
7712d0ada0
Allow to disable Stacktrace support
Enable backtrace stuff only if GNU C library used, because current
backtrace implementation based  on  <execinfo.h> , which is not a
part of standard C library, it is a GNU extension.

This will be usefull when building  with  custom POSIX-compilant C
library (like musl) and no <execinfo.h> available.

Note: configure script will detect presence of  <execinfo.h>  and
enable/disable feature depending on it.

Feature is enabled by default.
2018-04-10 20:51:11 +03:00
dzmat
9d0ab0ae5f speedwidget class: excess QtConcurent usage removal 2017-10-12 20:59:13 +07:00
Chocobo1
39b56ac598
Move NOMINMAX define 2017-08-29 13:39:01 +08:00
Chocobo1
551ffb88ab
Define QT_USE_QSTRINGBUILDER.
The old defines are deprecated.
QT_USE_QSTRINGBUILDER also supports QByteArray which we use extensively
in WebUI.
2017-08-29 13:37:29 +08:00
vit9696
d25467d3e6 Various macOS UI improvements 2017-07-15 20:49:40 +03: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
30bf6e958f Use system file type specific icons in contents tab
The icon is determined via QFileIconProvider using filename extension only.
2017-07-03 16:49:14 +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
Chocobo1
7539bee5c5 Remove remaining QBT_USES_QT5 defines.
Fixup of e64bb1de8c.
2017-03-06 23:47:07 +08:00
Eugene Shalygin
008d7dbedc Raise minimal Qt version to 5.5.1 2017-03-05 22:24:59 +01:00
Eugene Shalygin
e64bb1de8c Drop Qt 4 support 2017-03-05 22:24:59 +01:00
Eugene Shalygin
8b64dd95a5 cmake: drop explicit Boost dependency
We get it implicitly from libtorrent
2016-04-23 02:02:13 +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
05e4d4fc0d cmake: copy qt version requirements from autotools
Set versions 4.8.0 and 5.2.0 as minimal required for Qt4 and Qt5.
2016-03-07 22:38:40 +01:00
Eugene Shalygin
64daecb266 add basic cmake support 2016-02-29 12:53:43 +01:00