File: FindSocket.cmake

package info (click to toggle)
libjson-rpc-cpp 0.7.0-2.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,124 kB
  • sloc: cpp: 6,491; xml: 202; sh: 65; makefile: 13
file content (20 lines) | stat: -rw-r--r-- 525 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# - This module determines the socket library of the system.
# The following variables are set
#  Socket_LIBRARIES     - the socket library
#  Socket_FOUND

if (${CMAKE_SYSTEM} MATCHES "Windows")
	if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
		set(Socket_LIBRARIES ws2_32)
	else()
		set(Socket_LIBRARIES wsock32 ws2_32)
	endif()
	set(Socket_FOUND 1)
elseif(${CMAKE_SYSTEM} MATCHES "INtime")
	set(Socket_LIBRARIES netlib)
	set(Socket_FOUND 1)
else()
	set(Socket_LIBRARIES)
	set(Socket_FOUND 1)
endif()