rublon-ssh/PAM/ssh/lib/CMakeLists.txt
rublon-bwi 7715b6fb45
Bwi/ws based auth (#6)
* Add websocket implementation

* Added configuration for build socket-io and rublon connector
2023-12-11 18:02:21 +01:00

58 lines
1.2 KiB
CMake

add_library(rublon-ssh-pam
SHARED
pam.cpp
)
set_target_properties(rublon-ssh-pam PROPERTIES PREFIX "")
set_target_properties(rublon-ssh-pam PROPERTIES OUTPUT_NAME "pam_rublon")
target_compile_options(rublon-ssh-pam
PUBLIC
-fwhole-program
-fvisibility=hidden
-ffunction-sections
-fdata-sections
-fno-unwind-tables
-fno-asynchronous-unwind-tables
-flto
)
target_link_options(rublon-ssh-pam
PUBLIC
-fpic
-s
-Wl,--gc-sections
-flto
)
target_link_libraries(rublon-ssh-pam
PUBLIC
rublon-ssh
-lcurl
-lssl
-lcrypto
-lsioclient_tls
)
execute_process (
COMMAND bash -c "awk -F= '/^ID=/{print $2}' /etc/os-release |tr -d '\n' | tr -d '\"'"
OUTPUT_VARIABLE outOS
)
if(${outOS} MATCHES "centos|rhel" )
message(INFO "detected rhen base system")
set(_destination /usr/lib64/security/)
elseif(${outOS} MATCHES "debian|ubuntu")
message(INFO "detected debian based system")
set(_destination /usr/lib/x86_64-linux-gnu/security/)
endif()
install(
TARGETS
rublon-ssh-pam
DESTINATION
${_destination}
COMPONENT
PAM
)