File CMakeLists.txt of Package rsh-redone
#
# CMake build script for rsh-redone
# Author : Cristian RodrÃguez <crrodriguez@suse.de>
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
PROJECT(rsh-redone C)
SET(CMAKE_VERBOSE_MAKEFILE ON)
FIND_LIBRARY(PAM_LIBRARY NAMES pam)
FIND_LIBRARY(UTIL_LIBRARY NAMES util)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -g -pipe -fpie")
SET(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -pie")
ADD_EXECUTABLE(rsh rsh.c)
ADD_EXECUTABLE(in.rshd rshd.c)
ADD_EXECUTABLE(rlogin rlogin.c)
ADD_EXECUTABLE(in.rlogind rlogind.c)
TARGET_LINK_LIBRARIES(in.rshd ${PAM_LIBRARY})
TARGET_LINK_LIBRARIES(in.rlogind ${UTIL_LIBRARY} ${PAM_LIBRARY})
INSTALL(PROGRAMS in.rlogind in.rshd DESTINATION sbin)
INSTALL(PROGRAMS rlogin rsh DESTINATION bin)
INSTALL(FILES rlogin.1 rsh.1 DESTINATION share/man/man1)
INSTALL(FILES rhosts.5 DESTINATION share/man/man5)
INSTALL(FILES rlogind.8 rshd.8 DESTINATION share/man/man8)
INSTALL(FILES pam/rlogin pam/rsh DESTINATION /etc/pam.d)