From e0d7e8f946259a51eb455b172e268e2d1590a281 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Thu, 21 Mar 2024 15:45:26 +0000 Subject: [PATCH] cmake: don't install pam file if exists fixes #209 --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index eb495f8..07e2338 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -83,5 +83,9 @@ protocol("unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml" "linux-dmabuf-unst # Installation install(TARGETS hyprlock) -install(FILES "pam/hyprlock" DESTINATION "${CMAKE_INSTALL_FULL_SYSCONFDIR}/pam.d") +install(CODE " + if (NOT EXISTS \"${CMAKE_INSTALL_FULL_SYSCONFDIR}/pam.d/hyprlock\") + install(FILES \"${CMAKE_SOURCE_DIR}/pam/hyprlock\" DESTINATION \"${CMAKE_INSTALL_FULL_SYSCONFDIR}/pam.d\") + endif() +")