forked from qbittorrent/qBittorrent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
58 lines (52 loc) · 2 KB
/
CMakeLists.txt
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
if (SYSTEMD)
if (NOT SYSTEMD_SERVICES_INSTALL_DIR)
find_package(Systemd)
if (NOT SYSTEMD_FOUND)
message(
FATAL_ERROR
"Could not locate systemd services install dir."
" Either pass the -DSYSTEMD_SERVICES_INSTALL_DIR=/path/to/systemd/services option"
" or install systemd pkg-config"
)
endif()
endif()
set(EXPAND_BINDIR ${CMAKE_INSTALL_FULL_BINDIR})
configure_file(systemd/qbittorrent-nox@.service.in ${CMAKE_CURRENT_BINARY_DIR}/qbittorrent-nox@.service @ONLY)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/qbittorrent-nox@.service"
DESTINATION ${SYSTEMD_SERVICES_INSTALL_DIR}
COMPONENT data
)
endif()
set(manPageLanguages
en
ru
)
foreach(manPageLanguage ${manPageLanguages})
install(FILES ${PROJECT_SOURCE_DIR}/doc/${manPageLanguage}/$<IF:$<BOOL:${GUI}>,qbittorrent.1,qbittorrent-nox.1>
# English man pages are installed into ${CMAKE_INSTALL_MANDIR}/man1, while man pages
# in other languages are installed into ${CMAKE_INSTALL_MANDIR}/${manPageLanguage}/man1.
DESTINATION ${CMAKE_INSTALL_MANDIR}/$<$<NOT:$<STREQUAL:${manPageLanguage},en>>:${manPageLanguage}/>man1
COMPONENT doc
)
endforeach()
if (GUI)
install(FILES org.qbittorrent.qBittorrent.desktop
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications/
COMPONENT data
)
install(FILES org.qbittorrent.qBittorrent.metainfo.xml
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/metainfo/
COMPONENT data
)
install(DIRECTORY menuicons/
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor
COMPONENT data
)
install(FILES
${PROJECT_SOURCE_DIR}/src/icons/qbittorrent-tray.svg
${PROJECT_SOURCE_DIR}/src/icons/qbittorrent-tray-dark.svg
${PROJECT_SOURCE_DIR}/src/icons/qbittorrent-tray-light.svg
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status
COMPONENT data
)
endif()