netcat-openbsd/CMakeLists.txt
Cristian Rodríguez b14b84a01b Accepting request 96244 from home:elvigia:branches:network:utilities
- Update xbuntu patches.
- Ensure we have large file support in 32 bit builds
- Fix rpmlint warnings

OBS-URL: https://build.opensuse.org/request/show/96244
OBS-URL: https://build.opensuse.org/package/show/network:utilities/netcat-openbsd?expand=0&rev=10
2011-12-10 17:51:08 +00:00

29 lines
1.2 KiB
CMake

#
# Cmake Build script for netcat-openbsd
# 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(netcat-openbsd C)
SET(CMAKE_VERBOSE_MAKEFILE ON)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -W -Wall")
#please fix cmake to avoid this %$#$#$ , there is no findGlib2.cmake built-in !
FIND_PATH(GLIB2_INCLUDE_DIR NAMES glib.h glibconfig.h PATHS /usr/include/glib-2.0)
FIND_PATH(GLIB2_WEIRD_INCLUDE_DIR NAMES glibconfig.h PATHS /usr/lib/glib-2.0/include /usr/lib64/glib-2.0/include)
FIND_LIBRARY(GLIB2_LIBRARY NAMES glib-2.0)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/openbsd-compat)
INCLUDE_DIRECTORIES(${GLIB2_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${GLIB2_WEIRD_INCLUDE_DIR})
SET(NETCAT_SRCS netcat.c atomicio.c socks.c openbsd-compat/base64.c openbsd-compat/readpassphrase.c)
ADD_EXECUTABLE(nc ${NETCAT_SRCS})
TARGET_LINK_LIBRARIES(nc ${GLIB2_LIBRARY})
INSTALL(PROGRAMS nc DESTINATION bin)
INSTALL(FILES nc.1 DESTINATION share/man/man1)