Add back smart_userlist
This commit is contained in:
@@ -71,6 +71,7 @@ INCLUDE_DIRECTORIES(
|
||||
|
||||
add_executable(nwwebui nwwebui.c)
|
||||
add_executable(check_login check_login.c)
|
||||
add_executable(smart_userlist smart_userlist.c)
|
||||
|
||||
#################################
|
||||
# Linking
|
||||
@@ -86,6 +87,11 @@ target_link_libraries(check_login
|
||||
${DL_LIBRARY}
|
||||
)
|
||||
|
||||
target_link_libraries(smart_userlist
|
||||
${PAM_LIBRARY}
|
||||
${DL_LIBRARY}
|
||||
)
|
||||
|
||||
#################################
|
||||
# Install Files
|
||||
##############
|
||||
@@ -129,6 +135,7 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/mars-nwe-webui.service DESTINATION ${S
|
||||
endif()
|
||||
|
||||
install(TARGETS check_login DESTINATION ${MARS_NWE_INSTALL_FULL_LIBEXECDIR})
|
||||
install(TARGETS smart_userlist DESTINATION ${MARS_NWE_INSTALL_FULL_LIBEXECDIR})
|
||||
|
||||
install(TARGETS nwwebui DESTINATION ${CMAKE_INSTALL_SBINDIR})
|
||||
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
# Optional CUPS command line utility support for SMArT WebUI.
|
||||
#
|
||||
# This module intentionally searches for the CUPS command line utilities
|
||||
# used by the WebUI, not for libcups development headers/libraries.
|
||||
#
|
||||
# Variables exported:
|
||||
#
|
||||
# WITH_CUPSUTILS
|
||||
# User option to enable/disable CUPS utility discovery.
|
||||
#
|
||||
# HAVE_CUPSUTILS
|
||||
# ON when the required CUPS utilities were found.
|
||||
#
|
||||
# SMART_CUPS_ENABLE
|
||||
# 1 when HAVE_CUPSUTILS is ON, otherwise 0. Intended for configure_file()
|
||||
# into Perl config files.
|
||||
#
|
||||
# CUPS_LPSTAT_EXECUTABLE
|
||||
# Path to lpstat.
|
||||
#
|
||||
# CUPS_LP_EXECUTABLE
|
||||
# Path to lp.
|
||||
#
|
||||
# CUPS_LPR_EXECUTABLE
|
||||
# Optional path to lpr, if available.
|
||||
|
||||
option(WITH_CUPSUTILS "Enable CUPS utility support for SMArT WebUI" ON)
|
||||
|
||||
set(HAVE_CUPSUTILS OFF)
|
||||
set(SMART_CUPS_ENABLE 0)
|
||||
|
||||
if(WITH_CUPSUTILS)
|
||||
find_program(CUPS_LPSTAT_EXECUTABLE NAMES lpstat)
|
||||
find_program(CUPS_LP_EXECUTABLE NAMES lp)
|
||||
find_program(CUPS_LPR_EXECUTABLE NAMES lpr)
|
||||
|
||||
if(CUPS_LPSTAT_EXECUTABLE AND CUPS_LP_EXECUTABLE)
|
||||
set(HAVE_CUPSUTILS ON)
|
||||
set(SMART_CUPS_ENABLE 1)
|
||||
message(STATUS "Found CUPS utilities: lpstat=${CUPS_LPSTAT_EXECUTABLE}, lp=${CUPS_LP_EXECUTABLE}")
|
||||
if(CUPS_LPR_EXECUTABLE)
|
||||
message(STATUS "Found optional CUPS lpr utility: ${CUPS_LPR_EXECUTABLE}")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "CUPS utilities not found; SMArT WebUI CUPS printer discovery disabled")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "CUPS utility support disabled")
|
||||
endif()
|
||||
|
||||
# Provide stable fallback strings for configure_file() consumers. These are
|
||||
# only used when SMART_CUPS_ENABLE is 0 or when the admin later overrides the
|
||||
# paths in smart.conf.
|
||||
if(NOT CUPS_LPSTAT_EXECUTABLE)
|
||||
set(CUPS_LPSTAT_EXECUTABLE "/usr/bin/lpstat")
|
||||
endif()
|
||||
|
||||
if(NOT CUPS_LP_EXECUTABLE)
|
||||
set(CUPS_LP_EXECUTABLE "/usr/bin/lp")
|
||||
endif()
|
||||
|
||||
if(NOT CUPS_LPR_EXECUTABLE)
|
||||
set(CUPS_LPR_EXECUTABLE "/usr/bin/lpr")
|
||||
endif()
|
||||
Reference in New Issue
Block a user