2021-02-22 04:50:45 +02:00
|
|
|
include_directories(${UNIXAUTH_INCLUDE_DIRS})
|
2014-11-13 19:30:51 +02:00
|
|
|
|
|
|
|
check_include_files(paths.h HAVE_PATHS_H)
|
2015-11-06 05:56:50 +02:00
|
|
|
|
|
|
|
configure_file(
|
|
|
|
config-kcheckpass.h.cmake
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/config-kcheckpass.h
|
|
|
|
)
|
2014-11-13 19:30:51 +02:00
|
|
|
|
|
|
|
set(kcheckpass_SRCS
|
2015-09-01 23:24:46 +03:00
|
|
|
kcheckpass.h
|
|
|
|
kcheckpass.c
|
|
|
|
checkpass_etcpasswd.c
|
|
|
|
checkpass_pam.c
|
|
|
|
checkpass_shadow.c
|
2014-11-13 19:30:51 +02:00
|
|
|
)
|
|
|
|
|
2015-09-01 04:37:19 +03:00
|
|
|
add_executable(kcheckpass ${kcheckpass_SRCS})
|
2014-11-13 19:30:51 +02:00
|
|
|
|
2015-09-01 23:24:46 +03:00
|
|
|
add_definitions(-U_REENTRANT)
|
2015-11-06 05:56:50 +02:00
|
|
|
target_link_libraries(kcheckpass
|
|
|
|
${UNIXAUTH_LIBRARIES}
|
|
|
|
${SOCKET_LIBRARIES}
|
|
|
|
)
|
|
|
|
|
2021-02-22 04:50:45 +02:00
|
|
|
if (PAM_FOUND)
|
|
|
|
set(kcheckpass_suid "")
|
|
|
|
else()
|
|
|
|
set(kcheckpass_suid "SETUID")
|
|
|
|
message(WARNING "PAM not found, will install kcheckpass SUID")
|
|
|
|
endif()
|
|
|
|
|
2015-11-06 05:56:50 +02:00
|
|
|
install(
|
|
|
|
TARGETS kcheckpass
|
2020-02-08 19:29:32 +00:00
|
|
|
DESTINATION ${KDE4_LIBEXEC_INSTALL_DIR}
|
2021-02-22 04:50:45 +02:00
|
|
|
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE ${kcheckpass_suid}
|
2015-11-06 05:56:50 +02:00
|
|
|
)
|