mirror of
https://github.com/fergalmoran/flameshot.git
synced 2026-01-06 09:03:58 +00:00
Fix CMake Package and DBUS Names (#819)
* Fix CMake Packaging to properly package assets.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
#cmake_policy(SET CMP0076 OLD)
|
||||
|
||||
project(
|
||||
flameshot
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
[D-BUS Service]
|
||||
Name=org.dharkael.Flameshot
|
||||
Name=org.flameshot.Flameshot
|
||||
Exec=/usr/local/bin/flameshot
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
|
||||
<node>
|
||||
<interface name="org.dharkael.Flameshot">
|
||||
<interface name="org.flameshot.Flameshot">
|
||||
|
||||
<!--
|
||||
graphicCapture:
|
||||
@@ -1,3 +1,3 @@
|
||||
[D-BUS Service]
|
||||
Name=org.dharkael.Flameshot
|
||||
Name=org.flameshot.Flameshot
|
||||
Exec=/usr/bin/flameshot
|
||||
@@ -121,7 +121,37 @@ endforeach()
|
||||
include(GNUInstallDirs)
|
||||
set(INSTALL_CONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/Flameshot)
|
||||
|
||||
# Install binary
|
||||
install(
|
||||
TARGETS flameshot
|
||||
EXPORT flameshot-targets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
|
||||
# Install desktop files, completion and dbus files
|
||||
configure_file(${CMAKE_SOURCE_DIR}/docs/desktopEntry/package/flameshot.desktop
|
||||
${CMAKE_CURRENT_BINARY_DIR}/share/applications/flameshot.desktop COPYONLY)
|
||||
|
||||
configure_file(${CMAKE_SOURCE_DIR}/docs/bash-completion/flameshot
|
||||
${CMAKE_CURRENT_BINARY_DIR}/share/bash-completions/completions/flameshot COPYONLY)
|
||||
|
||||
configure_file(${CMAKE_SOURCE_DIR}/data/dbus/org.flameshot.Flameshot.xml
|
||||
${CMAKE_CURRENT_BINARY_DIR}/share/dbus-1/interfaces/org.flameshot.Flameshot.xml COPYONLY)
|
||||
|
||||
configure_file(${CMAKE_SOURCE_DIR}/data/dbus/package/org.flameshot.Flameshot.service
|
||||
${CMAKE_CURRENT_BINARY_DIR}/share/dbus-1/services/org.flameshot.Flameshot.service COPYONLY)
|
||||
|
||||
# Install Icons
|
||||
configure_file(${CMAKE_SOURCE_DIR}/data/img/hicolor/48x48/apps/flameshot.png
|
||||
${CMAKE_CURRENT_BINARY_DIR}/share/icons/hicolor/48x48/apps/flameshot.png COPYONLY)
|
||||
|
||||
configure_file(${CMAKE_SOURCE_DIR}/data/img/hicolor/128x128/apps/flameshot.png
|
||||
${CMAKE_CURRENT_BINARY_DIR}/share/icons/hicolor/128x128/apps/flameshot.png COPYONLY)
|
||||
|
||||
configure_file(${CMAKE_SOURCE_DIR}/data/img/hicolor/scalable/apps/flameshot.svg
|
||||
${CMAKE_CURRENT_BINARY_DIR}/share/icons/hicolor/scalable/apps/flameshot.svg COPYONLY)
|
||||
|
||||
# Install assets
|
||||
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/share/ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR})
|
||||
|
||||
# Install Translations
|
||||
install(FILES ${QM_FILES} DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/flameshot/translations)
|
||||
|
||||
Reference in New Issue
Block a user