diff options
author | 2016-05-27 17:15:21 +0200 | |
---|---|---|
committer | 2016-05-27 17:15:21 +0200 | |
commit | 13a8c36f354376b622cebb3348f2500d87b980a9 (patch) | |
tree | e43c967a07cfc908d8c0e7a4afeb7fb112d31f45 /src/CMakeLists.txt | |
parent | 18439204034fca982b3b65c2d581f80a9ee62f56 (diff) |
Adds the library libafbwsc.so
This library is intended to be used by C clients to connect
to the binder and access to its fetures through the websocket.
An example of integration is given by afb-client-demo.c
It is known that it introduces an unwanted dependency to afb-common.
This is a temporary issue.
Change-Id: Ie0a395f116f6ee05679525a6399ef23ef245c944
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3b3c6fd4..f41a3a88 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -51,6 +51,9 @@ ADD_LIBRARY(afb-lib STATIC websock.c ) +########################################### +# build and install afb-daemon +########################################### ADD_EXECUTABLE(afb-daemon main.c) TARGET_LINK_LIBRARIES(afb-daemon afb-lib @@ -66,11 +69,29 @@ TARGET_LINK_LIBRARIES(afb-daemon INSTALL(TARGETS afb-daemon RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) +########################################### +# build and install libafbwsc +########################################### +ADD_LIBRARY(afbwsc SHARED afb-ws.c afb-ws-client.c afb-wsj1.c websock.c afb-common.c) +TARGET_LINK_LIBRARIES(afbwsc + ${libsystemd_LIBRARIES} + -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/export-afbwsc.map + -Wl,--as-needed + -Wl,--gc-sections +) +INSTALL(TARGETS afbwsc LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +INSTALL(FILES afb-wsj1.h afb-ws-client.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/afb) + +########################################### +# build and install afb-client-demo +########################################### ADD_EXECUTABLE(afb-client-demo afb-client-demo.c) TARGET_LINK_LIBRARIES(afb-client-demo - afb-lib + afbwsc ${link_libraries} ${libsystemd_LIBRARIES} ) INSTALL(TARGETS afb-client-demo RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + + |