view C++/Tests/Sockets/CMakeLists.txt @ 319:cba77da58496

* Finalize SocketSsl * Add documentation
author David Demelier <markand@malikania.fr>
date Sun, 08 Mar 2015 11:04:01 +0100
parents c9356cb38c86
children
line wrap: on
line source

#
# CMakeLists.txt -- tests for sockets
#
# Copyright (c) 2013, 2014 David Demelier <markand@malikania.fr>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#

find_package(OpenSSL REQUIRED)

set(
	SOURCES
	${code_SOURCE_DIR}/C++/Socket.cpp
	${code_SOURCE_DIR}/C++/Socket.h
	${code_SOURCE_DIR}/C++/SocketTcp.cpp
	${code_SOURCE_DIR}/C++/SocketTcp.h
	${code_SOURCE_DIR}/C++/SocketUdp.cpp
	${code_SOURCE_DIR}/C++/SocketUdp.h
	${code_SOURCE_DIR}/C++/SocketAddress.cpp
	${code_SOURCE_DIR}/C++/SocketAddress.h
	${code_SOURCE_DIR}/C++/SocketListener.cpp
	${code_SOURCE_DIR}/C++/SocketListener.h
	${code_SOURCE_DIR}/C++/SocketSsl.cpp
	${code_SOURCE_DIR}/C++/SocketSsl.h
	main.cpp
)

define_test(socket "${SOURCES}")

if (WIN32)
	target_link_libraries(socket ws2_32)
endif ()

target_include_directories(socket PRIVATE ${OPENSSL_INCLUDE_DIR})
target_link_libraries(socket ${OPENSSL_LIBRARIES})