Skip to content

Commit

Permalink
cmake: don't install pam file if exists
Browse files Browse the repository at this point in the history
fixes #209
  • Loading branch information
vaxerski committed Mar 21, 2024
1 parent f77e17e commit e0d7e8f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
")

0 comments on commit e0d7e8f

Please sign in to comment.