Update Changelog
[qBittorrent.git] / dist / unix / CMakeLists.txt
blobdefe3af0699e9f09b025bcc3019c15a75e1e93d7
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 if (GUI)
22     list(APPEND MAN_FILES ${PROJECT_SOURCE_DIR}/doc/qbittorrent.1)
23 else()
24     list(APPEND MAN_FILES ${PROJECT_SOURCE_DIR}/doc/qbittorrent-nox.1)
25 endif()
27 install(FILES ${MAN_FILES}
28     DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
29     COMPONENT doc
32 if (GUI)
33     install(FILES org.qbittorrent.qBittorrent.desktop
34         DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications/
35         COMPONENT data
36     )
38     install(FILES org.qbittorrent.qBittorrent.metainfo.xml
39         DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/metainfo/
40         COMPONENT data
41     )
43     install(DIRECTORY menuicons/
44         DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor
45         COMPONENT data
46     )
48     install(FILES
49         ${PROJECT_SOURCE_DIR}/src/icons/qbittorrent-tray.svg
50         ${PROJECT_SOURCE_DIR}/src/icons/qbittorrent-tray-dark.svg
51         ${PROJECT_SOURCE_DIR}/src/icons/qbittorrent-tray-light.svg
52         DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status
53         COMPONENT data
54     )
55 endif()