@ -58,6 +58,28 @@ add_library(libmosquitto SHARED
u t i l _ m o s q . c u t i l _ m o s q . h
w i l l _ m o s q . c w i l l _ m o s q . h )
# t a r g e t f o r b u i l d i n g s t a t i c v e r s i o n o f l i b r a r y
add_library ( libmosquitto_static STATIC
l o g g i n g _ m o s q . c l o g g i n g _ m o s q . h
m e m o r y _ m o s q . c m e m o r y _ m o s q . h
m e s s a g e s _ m o s q . c m e s s a g e s _ m o s q . h
m o s q u i t t o . c m o s q u i t t o . h
m o s q u i t t o _ i n t e r n a l . h
m q t t 3 _ p r o t o c o l . h
n e t _ m o s q . c n e t _ m o s q . h
r e a d _ h a n d l e . c r e a d _ h a n d l e . h
r e a d _ h a n d l e _ c l i e n t . c
r e a d _ h a n d l e _ s h a r e d . c
s e n d _ c l i e n t _ m o s q . c
s e n d _ m o s q . c s e n d _ m o s q . h
s o c k s _ m o s q . c
s r v _ m o s q . c
t h r e a d _ m o s q . c
t i m e _ m o s q . c
t l s _ m o s q . c
u t i l _ m o s q . c u t i l _ m o s q . h
w i l l _ m o s q . c w i l l _ m o s q . h )
set ( LIBRARIES ${ OPENSSL_LIBRARIES } ${ PTHREAD_LIBRARIES } )
if ( UNIX AND NOT APPLE )
@ -81,13 +103,22 @@ endif (${WITH_SRV} STREQUAL ON)
target_link_libraries ( libmosquitto ${ LIBRARIES } )
target_link_libraries ( libmosquitto_static ${ LIBRARIES } )
set_target_properties ( libmosquitto PROPERTIES
O U T P U T _ N A M E m o s q u i t t o
V E R S I O N $ { V E R S I O N }
S O V E R S I O N 1
)
install ( TARGETS libmosquitto RUNTIME DESTINATION ${ BINDIR } LIBRARY DESTINATION ${ LIBDIR } )
set_target_properties ( libmosquitto_static PROPERTIES
O U T P U T _ N A M E m o s q u i t t o
V E R S I O N $ { V E R S I O N }
)
target_compile_definitions ( libmosquitto_static PUBLIC "STATIC_LIB" )
install ( TARGETS libmosquitto libmosquitto_static RUNTIME DESTINATION ${ BINDIR } LIBRARY DESTINATION ${ LIBDIR } ARCHIVE DESTINATION ${ LIBDIR } )
install ( FILES mosquitto.h DESTINATION ${ INCLUDEDIR } )
if ( UNIX AND NOT APPLE )