2021-03-07 02:40:21 +02:00
|
|
|
# Try to find Sudo, once done this will define:
|
2015-07-11 15:58:07 +03:00
|
|
|
#
|
|
|
|
# SUDO_FOUND - sudo has been found
|
|
|
|
# SUDO_EXECUTABLE - the sudo executable path
|
|
|
|
#
|
2021-03-07 02:40:21 +02:00
|
|
|
# Copyright (c) 2021 Ivailo Monev <xakepa10@gmail.com>
|
|
|
|
#
|
|
|
|
# Redistribution and use is allowed according to the terms of the BSD license.
|
|
|
|
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
2015-07-11 15:58:07 +03:00
|
|
|
|
2021-03-07 02:40:21 +02:00
|
|
|
find_program(SUDO_EXECUTABLE
|
|
|
|
NAMES sudo
|
2021-02-26 20:15:41 +02:00
|
|
|
HINTS ${KDE4_BIN_INSTALL_DIR}
|
2015-07-11 15:58:07 +03:00
|
|
|
DOC "sudo -- execute a command as another user"
|
|
|
|
)
|
|
|
|
|
2021-03-07 02:40:21 +02:00
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
find_package_handle_standard_args(Sudo
|
|
|
|
REQUIRED_VARS SUDO_EXECUTABLE
|
|
|
|
)
|
|
|
|
|
|
|
|
mark_as_advanced(SUDO_EXECUTABLE)
|