Volker Schroer 39da83c61d The uninstall script did not remove the previously installed freedesktop icons and desktop files.
Now grc_setup_freedesktop uninstall is called in cmake_uninstall.cmake

As far as I can see the icon and menu files are only needed in the freedesktop environment.
It's not necessary to put them into gnuradio install path.

So I removed these copies and installed these files directly from the source directory
using xdg-icon-resource and other xdg-utils.

Giving grc_setup_freedesktop execute permissions in the build directory avoids copying it
to the libexec directory. So even if ENABLE_POSTINSTALL=ON no libexec directory will be created.

Signed-off-by: Volker Schroer <3470424+dl1ksv@users.noreply.github.com>
2023-03-11 16:13:45 -08:00

29 lines
1.0 KiB
CMake

# Copyright 2011-2012 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
########################################################################
find_program(HAVE_XDG_UTILS xdg-desktop-menu)
if(UNIX AND HAVE_XDG_UTILS AND ENABLE_POSTINSTALL)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/grc_setup_freedesktop.in
${CMAKE_CURRENT_BINARY_DIR}/grc_setup_freedesktop
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
@ONLY)
install (
CODE "execute_process(COMMAND ${CMAKE_CURRENT_BINARY_DIR}/grc_setup_freedesktop install)"
)
endif(UNIX AND HAVE_XDG_UTILS AND ENABLE_POSTINSTALL)
if(UNIX AND ENABLE_TESTING)
find_program(APPSTREAMCLI appstream-util)
if(APPSTREAMCLI)
GR_ADD_TEST(metainfo_test "${APPSTREAMCLI}" validate-relax "${CMAKE_CURRENT_SOURCE_DIR}/org.gnuradio.grc.metainfo.xml")
endif(APPSTREAMCLI)
endif(UNIX AND ENABLE_TESTING)