1c29955eaSTrond Norbyeinclude_directories(AFTER ${LIBEVENT_INCLUDE_DIR})
2c6290174STrond Norbyeadd_library(cbsocket SHARED
3c6290174STrond Norbye            ${Platform_SOURCE_DIR}/include/platform/socket.h
4c6290174STrond Norbye            socket.cc)
5c29955eaSTrond Norbye
6c29955eaSTrond Norbyetarget_link_libraries(cbsocket
7c29955eaSTrond Norbye                      dirutils
86696145fSDave Rigby                      gsl_lite
9c29955eaSTrond Norbye                      platform
10c29955eaSTrond Norbye                      ${LIBEVENT_LIBRARIES}
11c29955eaSTrond Norbye                      ${COUCHBASE_NETWORK_LIBS})
12c29955eaSTrond Norbye
13c6290174STrond Norbyegenerate_export_header(cbsocket
14c6290174STrond Norbye                       EXPORT_MACRO_NAME CBSOCKET_PUBLIC_API
15c6290174STrond Norbye                       EXPORT_FILE_NAME ${Platform_BINARY_DIR}/include/platform/socket-visibility.h)
16c6290174STrond Norbye
17c6290174STrond Norbyeinstall(TARGETS cbsocket
18c6290174STrond Norbye        RUNTIME DESTINATION bin
19c6290174STrond Norbye        LIBRARY DESTINATION lib
20c6290174STrond Norbye        ARCHIVE DESTINATION lib)
21