hyprwm / xdg-desktop-portal-hyprland

xdg-desktop-portal backend for Hyprland
BSD 3-Clause "New" or "Revised" License
273 stars 47 forks source link

[CMake] Fails to install under non-default prefix #158

Closed jbeich closed 8 months ago

jbeich commented 8 months ago

Regressed by #154 due to using CMAKE_INSTALL_DATAROOTDIR without include(GNUInstallDirs).

$ cmake -DCMAKE_INSTALL_PREFIX:PATH=/tmp/xdg-desktop-portal-hyprland_prefix -B /tmp/xdg-desktop-portal-hyprland_build -G Ninja
$ cmake --build /tmp/xdg-desktop-portal-hyprland_build
$ cmake --install /tmp/xdg-desktop-portal-hyprland_build
-- Install configuration: ""
-- Installing: /tmp/xdg-desktop-portal-hyprland_prefix/bin/hyprland-share-picker
-- Set non-toolchain portion of runtime path of "/tmp/xdg-desktop-portal-hyprland_prefix/bin/hyprland-share-picker" to ""
-- Up-to-date: /tmp/xdg-desktop-portal-hyprland_prefix/bin/hyprland-share-picker
-- Installing: /tmp/xdg-desktop-portal-hyprland_prefix/bin/xdg-desktop-portal-hyprland
-- Set non-toolchain portion of runtime path of "/tmp/xdg-desktop-portal-hyprland_prefix/bin/xdg-desktop-portal-hyprland" to ""
CMake Error at /tmp/xdg-desktop-portal-hyprland_build/cmake_install.cmake:94 (file):
  file cannot create directory: /xdg-desktop-portal/portals.  Maybe need
  administrative privileges.
fufexan commented 8 months ago

Fixed in 86a94c3e4edb39ccc5584eac51a87930593daf2c.

jbeich commented 8 months ago

I confirm, installs fine now.