Skip to content

Commit

Permalink
Putting the list of files into a variable C_SRC and modiftying the ad…
Browse files Browse the repository at this point in the history
…d_library calls to use this variable

Signed-off-by: Ian Johnson <[email protected]>
  • Loading branch information
Ian Johnson committed Apr 19, 2016
1 parent 93906b9 commit 3499c09
Showing 1 changed file with 4 additions and 31 deletions.
35 changes: 4 additions & 31 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,7 @@ include_directories(${mosquitto_SOURCE_DIR} ${mosquitto_SOURCE_DIR}/lib
${OPENSSL_INCLUDE_DIR} ${PTHREAD_INCLUDE_DIR})
link_directories(${mosquitto_SOURCE_DIR}/lib)

add_library(libmosquitto SHARED
handle_connack.c
handle_ping.c
handle_pubackcomp.c
handle_publish.c
handle_pubrec.c
handle_pubrel.c
handle_suback.c
handle_unsuback.c
helpers.c
logging_mosq.c logging_mosq.h
set(C_SRC logging_mosq.c logging_mosq.h
memory_mosq.c memory_mosq.h
messages_mosq.c messages_mosq.h
mosquitto.c mosquitto.h
Expand All @@ -58,27 +48,10 @@ add_library(libmosquitto SHARED
util_mosq.c util_mosq.h
will_mosq.c will_mosq.h)

add_library(libmosquitto SHARED ${C_SRC} )

#target for building static version of library
add_library(libmosquitto_static STATIC
logging_mosq.c logging_mosq.h
memory_mosq.c memory_mosq.h
messages_mosq.c messages_mosq.h
mosquitto.c mosquitto.h
mosquitto_internal.h
mqtt3_protocol.h
net_mosq.c net_mosq.h
read_handle.c read_handle.h
read_handle_client.c
read_handle_shared.c
send_client_mosq.c
send_mosq.c send_mosq.h
socks_mosq.c
srv_mosq.c
thread_mosq.c
time_mosq.c
tls_mosq.c
util_mosq.c util_mosq.h
will_mosq.c will_mosq.h)
add_library(libmosquitto_static STATIC ${C_SRC})

set (LIBRARIES ${OPENSSL_LIBRARIES} ${PTHREAD_LIBRARIES})

Expand Down

0 comments on commit 3499c09

Please sign in to comment.