kdelibs/cmake/modules/FindSudo.cmake
Ivailo Monev f64673c9ea kdesu: make the optional sudo support obvious
previously one had to set KDESU_USE_SUDO_DEFAULT to build kdesu
with sudo support and no message has been printed to show that it
was/was not found in the features log.
2015-07-11 15:58:07 +03:00

19 lines
466 B
CMake

# - Try to find Sudo
# Once done this will define
#
# SUDO_FOUND - sudo has been found
# SUDO_EXECUTABLE - the sudo executable path
#
find_program(SUDO_EXECUTABLE NAMES sudo
HINTS ${BIN_INSTALL_DIR}
DOC "sudo -- execute a command as another user"
)
if(SUDO_EXECUTABLE)
set(SUDO_FOUND TRUE)
message(STATUS "Found Sudo: ${SUDO_EXECUTABLE}")
else(SUDO_EXECUTABLE)
set(SUDO_FOUND FALSE)
message(STATUS "Sudo not found.")
endif(SUDO_EXECUTABLE)