transmission/gtk/CMakeLists.txt

264 lines
7.5 KiB
CMake
Raw Normal View History

project(trgtk)
add_compile_options(${C_WARNING_FLAGS})
execute_process(
COMMAND
${PKG_CONFIG_EXECUTABLE} gio-2.0 --variable glib_compile_resources
OUTPUT_VARIABLE
GLIB_COMPILE_RESOURCES_EXECUTABLE
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(NOT GLIB_COMPILE_RESOURCES_EXECUTABLE)
message(SEND_ERROR "Unable to find glib-compile-resources executable")
endif()
find_program(APPSTREAM appstreamcli)
Add support for GTK 4 (#3916) * Make compact mode switch work for both GTK 3 and 4 * Implement GTK 4-specific view gesture handling * Fix torrents view context menu on GTK 4 * Explicitly show/hide menubar on startup/teardown * Switch from `Gtk::Pixbuf` to `Gio::Icon` for views * Support GTK 4 exceptions based on `std::exception` * Fix options menu setup with GTK 4 * Use `delete-event` (GTK 3) and `close-request` (GTK 4) signals to handle window clousure * Add custom file chooser button implementation GTK 4 drops FileChooserButton widget and suggests implementing it using Button. * Add helpers to set X11 hints with GTK 4 * Remove `HigWorkarea` class that's no longer used * Make main menu shortcuts work with GTK 4 * Make drops work in main window and make dialog with GTK 4 * Remove unused `gtr_action_get_widget()` helper * Fix text direction mark setup with GTK 4 (due to switch to enum class) * Fix file tree font size calculation with GTK 4 * Fix crash during shutdown with GTK 4 * Switch from `RadioButton` to `CheckButton` for compatibility with GTK 4 * Fix opening files with GTK 4 * Rework torrent cell renderer to support both GTK 3 and 4 * Disable system tray icon support with GTK 4 * Fix windows positioning with GTK 4 * Fix focus event handling with GTK 4 * Adapt to tree model row/iterator changes in GTK 4 * Adapt to toplevel/root window changes in GTK 4 * Adapt to clipboard changes in GTK 4 * Adapt to icon/theme changes in GTK 4 * Adapt to file/path changes in GTK 4 * Random leftover fixes for GTK 4 compatibility * Clean up unused code * Move GTK 3 *.ui files into a subdirectory * Add GTK 4 *.ui files * Search for both GTK 3 and 4 during configuration
2022-10-08 22:50:03 +00:00
if(GTK_VERSION EQUAL 4)
set(UI_SUBDIR ui/gtk4)
else()
set(UI_SUBDIR ui/gtk3)
endif()
set(${PROJECT_NAME}_UI_FILES
Add support for GTK 4 (#3916) * Make compact mode switch work for both GTK 3 and 4 * Implement GTK 4-specific view gesture handling * Fix torrents view context menu on GTK 4 * Explicitly show/hide menubar on startup/teardown * Switch from `Gtk::Pixbuf` to `Gio::Icon` for views * Support GTK 4 exceptions based on `std::exception` * Fix options menu setup with GTK 4 * Use `delete-event` (GTK 3) and `close-request` (GTK 4) signals to handle window clousure * Add custom file chooser button implementation GTK 4 drops FileChooserButton widget and suggests implementing it using Button. * Add helpers to set X11 hints with GTK 4 * Remove `HigWorkarea` class that's no longer used * Make main menu shortcuts work with GTK 4 * Make drops work in main window and make dialog with GTK 4 * Remove unused `gtr_action_get_widget()` helper * Fix text direction mark setup with GTK 4 (due to switch to enum class) * Fix file tree font size calculation with GTK 4 * Fix crash during shutdown with GTK 4 * Switch from `RadioButton` to `CheckButton` for compatibility with GTK 4 * Fix opening files with GTK 4 * Rework torrent cell renderer to support both GTK 3 and 4 * Disable system tray icon support with GTK 4 * Fix windows positioning with GTK 4 * Fix focus event handling with GTK 4 * Adapt to tree model row/iterator changes in GTK 4 * Adapt to toplevel/root window changes in GTK 4 * Adapt to clipboard changes in GTK 4 * Adapt to icon/theme changes in GTK 4 * Adapt to file/path changes in GTK 4 * Random leftover fixes for GTK 4 compatibility * Clean up unused code * Move GTK 3 *.ui files into a subdirectory * Add GTK 4 *.ui files * Search for both GTK 3 and 4 during configuration
2022-10-08 22:50:03 +00:00
${UI_SUBDIR}/AddTrackerDialog.ui
${UI_SUBDIR}/DetailsDialog.ui
${UI_SUBDIR}/EditTrackersDialog.ui
${UI_SUBDIR}/FilterBar.ui
${UI_SUBDIR}/MainWindow.ui
${UI_SUBDIR}/MakeDialog.ui
${UI_SUBDIR}/MakeProgressDialog.ui
${UI_SUBDIR}/MessageLogWindow.ui
${UI_SUBDIR}/OptionsDialog.ui
${UI_SUBDIR}/PrefsDialog.ui
${UI_SUBDIR}/RelocateDialog.ui
${UI_SUBDIR}/StatsDialog.ui
${UI_SUBDIR}/TorrentUrlChooserDialog.ui
)
Add support for GTK 4 (#3916) * Make compact mode switch work for both GTK 3 and 4 * Implement GTK 4-specific view gesture handling * Fix torrents view context menu on GTK 4 * Explicitly show/hide menubar on startup/teardown * Switch from `Gtk::Pixbuf` to `Gio::Icon` for views * Support GTK 4 exceptions based on `std::exception` * Fix options menu setup with GTK 4 * Use `delete-event` (GTK 3) and `close-request` (GTK 4) signals to handle window clousure * Add custom file chooser button implementation GTK 4 drops FileChooserButton widget and suggests implementing it using Button. * Add helpers to set X11 hints with GTK 4 * Remove `HigWorkarea` class that's no longer used * Make main menu shortcuts work with GTK 4 * Make drops work in main window and make dialog with GTK 4 * Remove unused `gtr_action_get_widget()` helper * Fix text direction mark setup with GTK 4 (due to switch to enum class) * Fix file tree font size calculation with GTK 4 * Fix crash during shutdown with GTK 4 * Switch from `RadioButton` to `CheckButton` for compatibility with GTK 4 * Fix opening files with GTK 4 * Rework torrent cell renderer to support both GTK 3 and 4 * Disable system tray icon support with GTK 4 * Fix windows positioning with GTK 4 * Fix focus event handling with GTK 4 * Adapt to tree model row/iterator changes in GTK 4 * Adapt to toplevel/root window changes in GTK 4 * Adapt to clipboard changes in GTK 4 * Adapt to icon/theme changes in GTK 4 * Adapt to file/path changes in GTK 4 * Random leftover fixes for GTK 4 compatibility * Clean up unused code * Move GTK 3 *.ui files into a subdirectory * Add GTK 4 *.ui files * Search for both GTK 3 and 4 during configuration
2022-10-08 22:50:03 +00:00
macro(gtr_compile_resources NAME INPUT_DIR INPUT_FILE OUTPUT_FILE_BASE)
add_custom_command(
OUTPUT
"${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE_BASE}.c"
"${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE_BASE}.h"
COMMAND
"${GLIB_COMPILE_RESOURCES_EXECUTABLE}"
"--target=${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE_BASE}.c"
"--sourcedir=${INPUT_DIR}"
--generate-source
--c-name "${NAME}"
"${INPUT_DIR}/${INPUT_FILE}"
COMMAND
"${GLIB_COMPILE_RESOURCES_EXECUTABLE}"
"--target=${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE_BASE}.h"
"--sourcedir=${INPUT_DIR}"
--generate-header
--c-name "${NAME}"
"${INPUT_DIR}/${INPUT_FILE}"
DEPENDS
"${INPUT_DIR}/${INPUT_FILE}"
${ARGN}
WORKING_DIRECTORY
"${INPUT_DIR}"
)
endmacro()
gtr_compile_resources(transmission ${CMAKE_CURRENT_SOURCE_DIR} transmission.gresource.xml transmission-resources
icons/hicolor_apps_scalable_transmission.svg
icons/lock.svg
icons/options-symbolic.svg
icons/ratio-symbolic.svg
icons/turtle-symbolic.svg
transmission-ui.css
transmission-ui.xml
)
gtr_compile_resources(transmission_ui ${CMAKE_CURRENT_SOURCE_DIR}/${UI_SUBDIR} transmission-ui.gresource.xml transmission-ui-resources
${${PROJECT_NAME}_UI_FILES}
)
if(ENABLE_NLS)
set(${PROJECT_NAME}_DESKTOP_FILE "${PROJECT_BINARY_DIR}/${TR_NAME}-gtk.desktop")
add_custom_command(
OUTPUT ${${PROJECT_NAME}_DESKTOP_FILE}
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} --desktop -d ${CMAKE_SOURCE_DIR}/po --template ${PROJECT_SOURCE_DIR}/transmission-gtk.desktop.in -o ${${PROJECT_NAME}_DESKTOP_FILE}
DEPENDS ${PROJECT_SOURCE_DIR}/transmission-gtk.desktop.in
VERBATIM
)
set(${PROJECT_NAME}_METAINFO_FILE "${PROJECT_BINARY_DIR}/${TR_NAME}-gtk.metainfo.xml")
add_custom_command(
OUTPUT ${${PROJECT_NAME}_METAINFO_FILE}
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} --xml -d ${CMAKE_SOURCE_DIR}/po --template ${PROJECT_SOURCE_DIR}/transmission-gtk.metainfo.xml.in -o ${${PROJECT_NAME}_METAINFO_FILE}
DEPENDS ${PROJECT_SOURCE_DIR}/transmission-gtk.metainfo.xml.in
VERBATIM
)
source_group("Generated Files" FILES ${${PROJECT_NAME}_DESKTOP_FILE} ${${PROJECT_NAME}_METAINFO_FILE})
endif()
set(${PROJECT_NAME}_SOURCES
Actions.cc
Application.cc
DetailsDialog.cc
Dialogs.cc
FaviconCache.cc
FileList.cc
FilterBar.cc
FreeSpaceLabel.cc
IconCache.cc
main.cc
MainWindow.cc
MakeDialog.cc
MessageLogWindow.cc
Notify.cc
OptionsDialog.cc
Add support for GTK 4 (#3916) * Make compact mode switch work for both GTK 3 and 4 * Implement GTK 4-specific view gesture handling * Fix torrents view context menu on GTK 4 * Explicitly show/hide menubar on startup/teardown * Switch from `Gtk::Pixbuf` to `Gio::Icon` for views * Support GTK 4 exceptions based on `std::exception` * Fix options menu setup with GTK 4 * Use `delete-event` (GTK 3) and `close-request` (GTK 4) signals to handle window clousure * Add custom file chooser button implementation GTK 4 drops FileChooserButton widget and suggests implementing it using Button. * Add helpers to set X11 hints with GTK 4 * Remove `HigWorkarea` class that's no longer used * Make main menu shortcuts work with GTK 4 * Make drops work in main window and make dialog with GTK 4 * Remove unused `gtr_action_get_widget()` helper * Fix text direction mark setup with GTK 4 (due to switch to enum class) * Fix file tree font size calculation with GTK 4 * Fix crash during shutdown with GTK 4 * Switch from `RadioButton` to `CheckButton` for compatibility with GTK 4 * Fix opening files with GTK 4 * Rework torrent cell renderer to support both GTK 3 and 4 * Disable system tray icon support with GTK 4 * Fix windows positioning with GTK 4 * Fix focus event handling with GTK 4 * Adapt to tree model row/iterator changes in GTK 4 * Adapt to toplevel/root window changes in GTK 4 * Adapt to clipboard changes in GTK 4 * Adapt to icon/theme changes in GTK 4 * Adapt to file/path changes in GTK 4 * Random leftover fixes for GTK 4 compatibility * Clean up unused code * Move GTK 3 *.ui files into a subdirectory * Add GTK 4 *.ui files * Search for both GTK 3 and 4 during configuration
2022-10-08 22:50:03 +00:00
PathButton.cc
Prefs.cc
PrefsDialog.cc
RelocateDialog.cc
Session.cc
StatsDialog.cc
SystemTrayIcon.cc
TorrentCellRenderer.cc
Utils.cc
${CMAKE_CURRENT_BINARY_DIR}/transmission-resources.c
Add support for GTK 4 (#3916) * Make compact mode switch work for both GTK 3 and 4 * Implement GTK 4-specific view gesture handling * Fix torrents view context menu on GTK 4 * Explicitly show/hide menubar on startup/teardown * Switch from `Gtk::Pixbuf` to `Gio::Icon` for views * Support GTK 4 exceptions based on `std::exception` * Fix options menu setup with GTK 4 * Use `delete-event` (GTK 3) and `close-request` (GTK 4) signals to handle window clousure * Add custom file chooser button implementation GTK 4 drops FileChooserButton widget and suggests implementing it using Button. * Add helpers to set X11 hints with GTK 4 * Remove `HigWorkarea` class that's no longer used * Make main menu shortcuts work with GTK 4 * Make drops work in main window and make dialog with GTK 4 * Remove unused `gtr_action_get_widget()` helper * Fix text direction mark setup with GTK 4 (due to switch to enum class) * Fix file tree font size calculation with GTK 4 * Fix crash during shutdown with GTK 4 * Switch from `RadioButton` to `CheckButton` for compatibility with GTK 4 * Fix opening files with GTK 4 * Rework torrent cell renderer to support both GTK 3 and 4 * Disable system tray icon support with GTK 4 * Fix windows positioning with GTK 4 * Fix focus event handling with GTK 4 * Adapt to tree model row/iterator changes in GTK 4 * Adapt to toplevel/root window changes in GTK 4 * Adapt to clipboard changes in GTK 4 * Adapt to icon/theme changes in GTK 4 * Adapt to file/path changes in GTK 4 * Random leftover fixes for GTK 4 compatibility * Clean up unused code * Move GTK 3 *.ui files into a subdirectory * Add GTK 4 *.ui files * Search for both GTK 3 and 4 during configuration
2022-10-08 22:50:03 +00:00
${CMAKE_CURRENT_BINARY_DIR}/transmission-ui-resources.c
)
set(${PROJECT_NAME}_HEADERS
Actions.h
Application.h
DetailsDialog.h
Dialogs.h
FaviconCache.h
FileList.h
FilterBar.h
FreeSpaceLabel.h
HigWorkarea.h
IconCache.h
MainWindow.h
MakeDialog.h
MessageLogWindow.h
Notify.h
OptionsDialog.h
Add support for GTK 4 (#3916) * Make compact mode switch work for both GTK 3 and 4 * Implement GTK 4-specific view gesture handling * Fix torrents view context menu on GTK 4 * Explicitly show/hide menubar on startup/teardown * Switch from `Gtk::Pixbuf` to `Gio::Icon` for views * Support GTK 4 exceptions based on `std::exception` * Fix options menu setup with GTK 4 * Use `delete-event` (GTK 3) and `close-request` (GTK 4) signals to handle window clousure * Add custom file chooser button implementation GTK 4 drops FileChooserButton widget and suggests implementing it using Button. * Add helpers to set X11 hints with GTK 4 * Remove `HigWorkarea` class that's no longer used * Make main menu shortcuts work with GTK 4 * Make drops work in main window and make dialog with GTK 4 * Remove unused `gtr_action_get_widget()` helper * Fix text direction mark setup with GTK 4 (due to switch to enum class) * Fix file tree font size calculation with GTK 4 * Fix crash during shutdown with GTK 4 * Switch from `RadioButton` to `CheckButton` for compatibility with GTK 4 * Fix opening files with GTK 4 * Rework torrent cell renderer to support both GTK 3 and 4 * Disable system tray icon support with GTK 4 * Fix windows positioning with GTK 4 * Fix focus event handling with GTK 4 * Adapt to tree model row/iterator changes in GTK 4 * Adapt to toplevel/root window changes in GTK 4 * Adapt to clipboard changes in GTK 4 * Adapt to icon/theme changes in GTK 4 * Adapt to file/path changes in GTK 4 * Random leftover fixes for GTK 4 compatibility * Clean up unused code * Move GTK 3 *.ui files into a subdirectory * Add GTK 4 *.ui files * Search for both GTK 3 and 4 during configuration
2022-10-08 22:50:03 +00:00
PathButton.h
Prefs.h
PrefsDialog.h
RelocateDialog.h
Session.h
StatsDialog.h
SystemTrayIcon.h
TorrentCellRenderer.h
Utils.h
${CMAKE_CURRENT_BINARY_DIR}/transmission-resources.h
Add support for GTK 4 (#3916) * Make compact mode switch work for both GTK 3 and 4 * Implement GTK 4-specific view gesture handling * Fix torrents view context menu on GTK 4 * Explicitly show/hide menubar on startup/teardown * Switch from `Gtk::Pixbuf` to `Gio::Icon` for views * Support GTK 4 exceptions based on `std::exception` * Fix options menu setup with GTK 4 * Use `delete-event` (GTK 3) and `close-request` (GTK 4) signals to handle window clousure * Add custom file chooser button implementation GTK 4 drops FileChooserButton widget and suggests implementing it using Button. * Add helpers to set X11 hints with GTK 4 * Remove `HigWorkarea` class that's no longer used * Make main menu shortcuts work with GTK 4 * Make drops work in main window and make dialog with GTK 4 * Remove unused `gtr_action_get_widget()` helper * Fix text direction mark setup with GTK 4 (due to switch to enum class) * Fix file tree font size calculation with GTK 4 * Fix crash during shutdown with GTK 4 * Switch from `RadioButton` to `CheckButton` for compatibility with GTK 4 * Fix opening files with GTK 4 * Rework torrent cell renderer to support both GTK 3 and 4 * Disable system tray icon support with GTK 4 * Fix windows positioning with GTK 4 * Fix focus event handling with GTK 4 * Adapt to tree model row/iterator changes in GTK 4 * Adapt to toplevel/root window changes in GTK 4 * Adapt to clipboard changes in GTK 4 * Adapt to icon/theme changes in GTK 4 * Adapt to file/path changes in GTK 4 * Random leftover fixes for GTK 4 compatibility * Clean up unused code * Move GTK 3 *.ui files into a subdirectory * Add GTK 4 *.ui files * Search for both GTK 3 and 4 during configuration
2022-10-08 22:50:03 +00:00
${CMAKE_CURRENT_BINARY_DIR}/transmission-ui-resources.h
)
include_directories(
${CMAKE_SOURCE_DIR}
${PROJECT_BINARY_DIR}
)
include_directories(
SYSTEM
${GTK${GTK_VERSION}_INCLUDE_DIRS}
${CURL_INCLUDE_DIRS}
${EVENT2_INCLUDE_DIRS}
)
if(WITH_APPINDICATOR)
include_directories(SYSTEM ${APPINDICATOR_INCLUDE_DIRS})
endif()
link_directories(
${GTK${GTK_VERSION}_LIBRARY_DIRS}
)
add_definitions(
"-DTRANSMISSIONLOCALEDIR=\"${CMAKE_INSTALL_FULL_LOCALEDIR}\""
"-DGETTEXT_PACKAGE=\"${TR_NAME}-gtk\""
-DG_DISABLE_DEPRECATED
-DGDK_PIXBUF_DISABLE_DEPRECATED
-DGDK_DISABLE_DEPRECATED
-DGTK_DISABLE_DEPRECATED
-DPANGO_DISABLE_DEPRECATED
# FIXME: these break libnotify's headers
# -DG_DISABLE_SINGLE_INCLUDES
# -DGTK_DISABLE_SINGLE_INCLUDES
-DGDKMM_DISABLE_DEPRECATED
-DGIOMM_DISABLE_DEPRECATED
-DGLIBMM_DISABLE_DEPRECATED
-DGTKMM_DISABLE_DEPRECATED
-DPANGOMM_DISABLE_DEPRECATED
-DSIGCXX_DISABLE_DEPRECATED
${GTK${GTK_VERSION}_CFLAGS_OTHER}
)
if(WITH_APPINDICATOR)
set_property(SOURCE SystemTrayIcon.cc APPEND PROPERTY COMPILE_DEFINITIONS HAVE_APPINDICATOR)
if(APPINDICATOR_IS_AYATANA)
set_property(SOURCE SystemTrayIcon.cc APPEND PROPERTY COMPILE_DEFINITIONS APPINDICATOR_IS_AYATANA)
endif()
endif()
tr_win32_app_info(${PROJECT_NAME}_WIN32_RC_FILE
"Transmission GTK+ Client"
"${TR_NAME}-gtk"
"${TR_NAME}-gtk.exe"
"${TR_NAME}.ico")
add_executable(${TR_NAME}-gtk WIN32
${${PROJECT_NAME}_SOURCES}
${${PROJECT_NAME}_HEADERS}
${${PROJECT_NAME}_DESKTOP_FILE}
${${PROJECT_NAME}_METAINFO_FILE}
${${PROJECT_NAME}_WIN32_RC_FILE}
)
target_link_libraries(${TR_NAME}-gtk
${TR_NAME}
${GTK${GTK_VERSION}_LIBRARIES}
${CURL_LIBRARIES}
${EVENT2_LIBRARIES}
)
if(WITH_APPINDICATOR)
target_link_libraries(${TR_NAME}-gtk ${APPINDICATOR_LIBRARIES})
endif()
if(NOT MSVC)
target_compile_options(${TR_NAME}-gtk PRIVATE -Wno-exit-time-destructors)
endif()
if(MSVC)
tr_append_target_property(${TR_NAME}-gtk LINK_FLAGS "/ENTRY:mainCRTStartup")
endif()
install(TARGETS ${TR_NAME}-gtk DESTINATION ${CMAKE_INSTALL_BINDIR})
set(${PROJECT_NAME}_PUBLIC_ICONS
hicolor_apps_scalable_transmission.svg
hicolor_apps_scalable_transmission-devel.svg
gtk: add symbolic icon The -symbolic icon variant (if available) is used in the GNOME top bar, and when the high contrast theme is in use. This icon was created by Jakub Steiner, and comes from the gnome-icons repository: https://github.com/gnome-design-team/gnome-icons/blob/master/apps-symbolic/Adwaita/scalable/apps/transmission-symbolic.svg https://bugzilla.redhat.com/show_bug.cgi?id=1221292 There is some confusion over whether symbolic app icons should be installed to icons/hicolor/scalable/apps (alongside the regular scalable icon) or to icons/hicolor/symbolic/apps. On the one hand, https://wiki.gnome.org/Initiatives/GnomeGoals/HighContrastAppIcons has this to say: > […] obtain a suitable symbolic style icon […] and install it to the > hicolor prefix, the same way you would for the full color variant. > > cp myapp-symbolic.svg /usr/share/icons/hicolor/scalable/apps/myapp-symbolic.svg On the other hand, the Fedora package at https://src.fedoraproject.org/rpms/transmission/blob/master/f/transmission.spec ships this icon in icons/hicolor/symbolic/apps: > # Install the symbolic icon > mkdir -p %{buildroot}%{_datadir}/icons/hicolor/symbolic/apps > cp %{SOURCE1} %{buildroot}%{_datadir}/icons/hicolor/symbolic/apps/transmission-symbolic.svg Anecdotally, icons in scalable/ have minimum size 64×64 on openSUSE, so symbolic/ is the safer location (given the GNOME top bar uses 32×32 icons). This has the advantage of matching the location used in the distribution which already ships this file. https://github.com/transmission/transmission/issues/414
2017-11-30 16:41:39 +00:00
hicolor_apps_symbolic_transmission-symbolic.svg
)
set(ICON_NAME_REGEX "^([^_]+)_([^_]+)_([^_]+)_(.+)$")
foreach(ICON ${${PROJECT_NAME}_PUBLIC_ICONS})
string(REGEX REPLACE ${ICON_NAME_REGEX} "\\1/\\3/\\2" ICON_DIR ${ICON})
string(REGEX REPLACE ${ICON_NAME_REGEX} "\\4" ICON_NAME ${ICON})
install(FILES icons/${ICON} DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/${ICON_DIR}/ RENAME ${ICON_NAME})
endforeach()
if(INSTALL_DOC)
install(FILES ${TR_NAME}-gtk.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
endif()
if(ENABLE_NLS)
install(FILES ${${PROJECT_NAME}_DESKTOP_FILE} DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
install(FILES ${${PROJECT_NAME}_METAINFO_FILE} DESTINATION ${CMAKE_INSTALL_DATADIR}/metainfo)
else()
install(FILES transmission-gtk.desktop.in DESTINATION ${CMAKE_INSTALL_DATADIR}/applications RENAME ${TR_NAME}-gtk.desktop)
endif()