FindSocket.cmake 525 B

123456789101112131415161718192021
  1. # - This module determines the socket library of the system.
  2. # The following variables are set
  3. # Socket_LIBRARIES - the socket library
  4. # Socket_FOUND
  5. if (${CMAKE_SYSTEM} MATCHES "Windows")
  6. if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
  7. set(Socket_LIBRARIES ws2_32)
  8. else()
  9. set(Socket_LIBRARIES wsock32 ws2_32)
  10. endif()
  11. set(Socket_FOUND 1)
  12. elseif(${CMAKE_SYSTEM} MATCHES "INtime")
  13. set(Socket_LIBRARIES netlib)
  14. set(Socket_FOUND 1)
  15. else()
  16. set(Socket_LIBRARIES)
  17. set(Socket_FOUND 1)
  18. endif()