blob: 26cb37ce01977df12e9c6fe9c2f3cd4e9aa12c00 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
add_library(qtmaildir_lib STATIC
keymap.cpp
config.cpp
mimeparser.cpp
requestinterceptor.cpp
htmlbuilder.cpp
cidschemehandler.cpp
notmuchworker.cpp
tagchip.cpp
tagcolors.cpp
tagstrip.cpp
threadlistmodel.cpp
mailsync.cpp
threadcidmap.cpp
messageview.cpp
mainwindow.cpp
)
target_include_directories(qtmaildir_lib
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${NOTMUCH_INCLUDE_DIR}
${CMAKE_BINARY_DIR}/generated/qtmaildir)
target_link_libraries(qtmaildir_lib
PUBLIC Qt6::Widgets Qt6::WebEngineWidgets PkgConfig::GMIME ${NOTMUCH_LIBRARY})
# resources.qrc belongs to the executable, not to the static library. A qrc
# compiled into a .a registers itself from a global initialiser, and the linker
# drops that object because nothing references it, so the resource silently
# fails to exist at runtime.
add_executable(qtmaildir main.cpp resources.qrc)
target_link_libraries(qtmaildir PRIVATE qtmaildir_lib)
install(TARGETS qtmaildir RUNTIME DESTINATION bin)
# The icon goes into the hicolor theme under its scalable directory, which is
# where a desktop environment looks for the Icon= name in the .desktop entry.
install(FILES ${CMAKE_SOURCE_DIR}/assets/icons/qtmaildir.svg
DESTINATION share/icons/hicolor/scalable/apps)
install(FILES ${CMAKE_SOURCE_DIR}/assets/qtmaildir.desktop
DESTINATION share/applications)
|