Enable customizing the save statistics time interval
[qBittorrent.git] / dist / unix / CMakeLists.txt
blob7072da5eafa987a85359a64b55cee32b9b0f2fac
1 if (SYSTEMD)
2     if (NOT SYSTEMD_SERVICES_INSTALL_DIR)
3         find_package(Systemd)
4         if (NOT SYSTEMD_FOUND)
5             message(
6                 FATAL_ERROR
7                 "Could not locate systemd services install dir."
8                 " Either pass the -DSYSTEMD_SERVICES_INSTALL_DIR=/path/to/systemd/services option"
9                 " or install systemd pkg-config"
10             )
11         endif()
12     endif()
13     set(EXPAND_BINDIR ${CMAKE_INSTALL_FULL_BINDIR})
14     configure_file(systemd/qbittorrent-nox@.service.in ${CMAKE_CURRENT_BINARY_DIR}/qbittorrent-nox@.service @ONLY)
15     install(FILES "${CMAKE_CURRENT_BINARY_DIR}/qbittorrent-nox@.service"
16         DESTINATION ${SYSTEMD_SERVICES_INSTALL_DIR}
17         COMPONENT data
18     )
19 endif()
21 set(manPageLanguages
22     en
23     ru
26 foreach(manPageLanguage ${manPageLanguages})
27     install(FILES ${PROJECT_SOURCE_DIR}/doc/${manPageLanguage}/$<IF:$<BOOL:${GUI}>,qbittorrent.1,qbittorrent-nox.1>
28         # English man pages are installed into ${CMAKE_INSTALL_MANDIR}/man1, while man pages
29         # in other languages are installed into ${CMAKE_INSTALL_MANDIR}/${manPageLanguage}/man1.
30         DESTINATION ${CMAKE_INSTALL_MANDIR}/$<$<NOT:$<STREQUAL:${manPageLanguage},en>>:${manPageLanguage}/>man1
31         COMPONENT doc
32     )
33 endforeach()
35 if (GUI)
36     install(FILES org.qbittorrent.qBittorrent.desktop
37         DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications/
38         COMPONENT data
39     )
41     install(FILES org.qbittorrent.qBittorrent.metainfo.xml
42         DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/metainfo/
43         COMPONENT data
44     )
46     install(DIRECTORY menuicons/
47         DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor
48         COMPONENT data
49     )
51     install(FILES
52         ${PROJECT_SOURCE_DIR}/src/icons/qbittorrent-tray.svg
53         ${PROJECT_SOURCE_DIR}/src/icons/qbittorrent-tray-dark.svg
54         ${PROJECT_SOURCE_DIR}/src/icons/qbittorrent-tray-light.svg
55         DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status
56         COMPONENT data
57     )
58 endif()