Export static symbols when building ws with shared library (#370)

This commit is contained in:
Anton Ivlev authored and GitHub committed 2022-03-19 11:41:40 -07:00
1 parent f7eb3688dd
commit a3d2fa4b7e
8 files changed
+79 -34

No files matched your search

+6
View File
@@ -99,6 +99,7 @@ set( IXWEBSOCKET_HEADERS
ixwebsocket/IXWebSocketCloseConstants.h
ixwebsocket/IXWebSocketCloseInfo.h
ixwebsocket/IXWebSocketErrorInfo.h
ixwebsocket/IXWebsocketExport.h
ixwebsocket/IXWebSocketHandshake.h
ixwebsocket/IXWebSocketHandshakeKeyGen.h
ixwebsocket/IXWebSocketHttpHeaders.h
@@ -173,6 +174,10 @@ else()
${IXWEBSOCKET_SOURCES}
${IXWEBSOCKET_HEADERS}
)
if( MSVC )
target_compile_definitions(ixwebsocket PUBLIC IXWEBSOCKET_STATIC_DEFINE)
endif()
endif()
if (USE_TLS)
@@ -286,6 +291,7 @@ if (IXWEBSOCKET_INSTALL)
install(TARGETS ixwebsocket
EXPORT ixwebsocket
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ixwebsocket/
)