diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2018-04-18 08:55:31 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@automotivelinux.org> | 2018-04-18 08:55:31 +0000 |
commit | 27c0ffd6e475eba00aa8883a822a841a4555cf2d (patch) | |
tree | dfb8543e9e6d5eca20bb4a5341a15217f61ed016 /CMakeLists.txt | |
parent | e396c20882ff644b06a93256eadf860bfb71756e (diff) | |
parent | 41ac48501b9070c6ca31fee324218dfd8e05466d (diff) |
Merge "Added a Qt's websocket client to AFB into helpers"
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f031163..5e1eb90 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,9 +21,27 @@ # Add target to project dependency list PROJECT_TARGET_ADD(afb-helpers) +set(CMAKE_AUTOMOC ON) + + set(AFB_HELPERS_SRCS curl-wrap.c escape.c wrap-json.c filescan-utils.c) + + option(AFB_HELPERS_QTWSCLIENT "Enable the Qt's websocket client to Application Framework Binders" OFF) + + if (AFB_HELPERS_QTWSCLIENT) + message(STATUS "Qt's WebSocket AFB Client: Enabled!") + set(AFB_HELPERS_SRCS ${AFB_HELPERS_SRCS} qafbwebsocketclient.cpp qafbwebsocketclient.h) + find_package(Qt5WebSockets REQUIRED) + else() + message(STATUS "Qt's WebSocket AFB Client: Disabled!") + endif() # Define targets - ADD_LIBRARY(${TARGET_NAME} STATIC curl-wrap.c escape.c wrap-json.c filescan-utils.c) + ADD_LIBRARY(${TARGET_NAME} STATIC ${AFB_HELPERS_SRCS}) + + if (AFB_HELPERS_QTWSCLIENT) + target_link_libraries(${TARGET_NAME} Qt5::WebSockets) + qt5_use_modules(${TARGET_NAME} WebSockets) + endif() # Library properties SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES |