diff options
| author | Danilo M. <danix@danix.xyz> | 2026-08-03 17:31:29 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-08-03 17:31:29 +0200 |
| commit | 8a4eba043008bf76266c6e707f80a1194f1b5dfa (patch) | |
| tree | 9eebbddc6a239ea9e2f00dfb3736e92c05d4b392 /CMakeLists.txt | |
| parent | 466163878545722c642289c74ce551821d179854 (diff) | |
| download | qtmaildir-8a4eba043008bf76266c6e707f80a1194f1b5dfa.tar.gz qtmaildir-8a4eba043008bf76266c6e707f80a1194f1b5dfa.zip | |
build: add a SlackBuild under assets/slackbuild
Packages the application for Slackware, following SBo conventions with
two deliberate departures: the tag is _danix rather than _SBo and the
package type is txz rather than tgz, since this is not an SBo
submission. sbolint reports exactly those two as errors and nothing
else; the template comments it warned about are gone.
Written against the install layout the build really produces, checked by
staging it: one binary, one .desktop entry and one scalable icon, no
libraries and no man or info pages. The template's .la removal, man and
info compression and perllocal.pod cleanup would all act on nothing
here, so they are left out rather than carried along as dead code.
doinst.sh keeps only the desktop-database and icon-cache updates.
The download URL and checksum are verified rather than assumed: sbodl
fetches the tarball and reports "md5sum matches OK".
Adds QTMAILDIR_BUILD_TESTS, defaulting to ON so the ordinary build is
unchanged. A packaging build has no use for the test binaries, and
building them pulls in Qt6::Test to produce nothing that ships. Note the
0.4.0 tarball predates this option, so with that source the flag is
accepted but does nothing; the README says so.
notmuch is the only dependency outside Slackware. Qt6 including
WebEngine, gmime and cmake are all stock, which is what REQUIRES
reflects.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 827b806..e974dd8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,16 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) -find_package(Qt6 6.5 REQUIRED COMPONENTS Widgets WebEngineWidgets Test) +# Off for a packaging build, which has no use for the test binaries and would +# otherwise pull in Qt6::Test and compile the whole suite to produce nothing +# that ships. +option(QTMAILDIR_BUILD_TESTS "Build the test suite" ON) + +set(QTMAILDIR_QT_COMPONENTS Widgets WebEngineWidgets) +if(QTMAILDIR_BUILD_TESTS) + list(APPEND QTMAILDIR_QT_COMPONENTS Test) +endif() +find_package(Qt6 6.5 REQUIRED COMPONENTS ${QTMAILDIR_QT_COMPONENTS}) # notmuch ships no pkg-config file; locate it by hand. find_path(NOTMUCH_INCLUDE_DIR notmuch.h) @@ -27,6 +36,8 @@ configure_file( ${CMAKE_CURRENT_BINARY_DIR}/generated/qtmaildir/version.h @ONLY) -enable_testing() add_subdirectory(src) -add_subdirectory(tests) +if(QTMAILDIR_BUILD_TESTS) + enable_testing() + add_subdirectory(tests) +endif() |
