X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2FCMakeLists.txt;h=af4f10c174efc511ec2102e3a2724e34dcfd83d2;hb=1ea6bd0f466a10d29f12801aa35fb6d2b30443a1;hp=3ea557f5cb56f98116e90ae38d1593aab86b806b;hpb=0ea46ffe93ab87cbd41df1a80d38904d026fcb3b;p=src%2Fapp-framework-binder.git diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3ea557f5..af4f10c1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,6 +1,8 @@ INCLUDE(FindPkgConfig) +ADD_DEFINITIONS(-DBINDING_INSTALL_DIR="${binding_install_dir}") + CHECK_INCLUDE_FILES(magic.h HAVE_MAGIC_H) CHECK_LIBRARY_EXISTS(magic magic_load "" HAVE_LIBMAGIC_SO) IF(HAVE_MAGIC_H) @@ -33,12 +35,15 @@ ADD_LIBRARY(afb-lib STATIC afb-apis.c afb-common.c afb-context.c + afb-evt.c afb-hreq.c afb-hsrv.c afb-hswitch.c afb-method.c afb-msg-json.c afb-sig-handler.c + afb-svc.c + afb-subcall.c afb-websock.c afb-ws-client.c afb-ws-json1.c @@ -49,6 +54,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 @@ -62,13 +70,34 @@ TARGET_LINK_LIBRARIES(afb-daemon -lrt ) INSTALL(TARGETS afb-daemon - RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}) + 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) +SET_TARGET_PROPERTIES(afbwsc PROPERTIES + VERSION ${LIBAFBWSC_VERSION} + SOVERSION ${LIBAFBWSC_SOVERSION}) +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_FULL_BINDIR}) + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + +