add basic cmake support

This commit is contained in:
Eugene Shalygin 2015-11-06 19:03:18 +01:00 committed by Eugene Shalygin
commit 64daecb266
26 changed files with 1242 additions and 0 deletions

10
dist/CMakeLists.txt vendored Normal file
View file

@ -0,0 +1,10 @@
if (APPLE)
add_subdirectory(mac)
else (APPLE)
if (UNIX)
add_subdirectory(unix)
endif (UNIX)
if (WIN32)
add_subdirectory(windows)
endif (WIN32)
endif (APPLE)

37
dist/unix/CMakeLists.txt vendored Normal file
View file

@ -0,0 +1,37 @@
if (SYSTEMD)
find_package(Systemd)
if (SYSTEMD_FOUND)
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 ${CMAKE_INSTALL_PREFIX}/${SYSTEMD_SERVICES_INSTALL_DIR}
COMPONENT data)
endif(SYSTEMD_FOUND)
endif(SYSTEMD)
if (GUI)
list(APPEND MAN_FILES ${qBittorrent_SOURCE_DIR}/doc/qbittorrent.1)
else (GUI)
list(APPEND MAN_FILES ${qBittorrent_SOURCE_DIR}/doc/qbittorrent.1)
endif (GUI)
install(FILES ${MAN_FILES}
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
COMPONENT doc)
install(DIRECTORY menuicons/
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor
FILES_MATCHING PATTERN "*.png")
install(FILES ${qBittorrent_SOURCE_DIR}/src/icons/qbittorrent.png
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pixmaps/
COMPONENT data)
install(FILES ${qBittorrent_SOURCE_DIR}/src/icons/qBittorrent.desktop
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications/
COMPONENT data)
install(FILES qBittorrent.appdata.xml
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/appdata/
COMPONENT data)

1
dist/windows/CMakeLists.txt vendored Normal file
View file

@ -0,0 +1 @@
install(FILES qt.conf DESTINATION ${CMAKE_INSTALL_BINDIR})