summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorLoïc Collignon <loic.collignon@iot.bzh>2019-03-07 16:20:24 +0100
committerLoïc Collignon <loic.collignon@iot.bzh>2019-03-07 16:20:24 +0100
commitf5bb1d7d963450a77587df9cb7cd25fad7617097 (patch)
tree31659b9f345e3d364ae4ce2ce91f1b2abe864810 /CMakeLists.txt
parenta9462458239b7c8c8073df25d8ba1d6005b9e856 (diff)
Moved Qt's automoc and autorcc variables
Thoses variables are used by CMake for building Qt's projects, thus need to find a Qt installation. Therefore you should set those to ON only if you also do a find_package to find a Qt installation. Change-Id: Ibd0042206913f2d4e65fc56092f3348efa3103da Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 5 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 682b42d..95ce156 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -30,10 +30,6 @@ set(PROJECT_AUTHOR_MAIL "fulup@iot.bzh")
set(PROJECT_LICENSE "APL2.0")
set(PROJECT_LANGUAGES "C")
-# Add target to project dependency list
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-
if(NOT CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX "/usr")
endif()
@@ -93,6 +89,11 @@ if(${AFB_HELPERS})
endif()
if(${AFB_HELPERS_QT})
+ message(STATUS "Qt's support enabled!")
+ # Add target to project dependency list
+ set(CMAKE_AUTOMOC ON)
+ set(CMAKE_AUTORCC ON)
+
find_package(Qt5WebSockets REQUIRED)
set(AFB_HELPERS_QT_HEADERS qafbwebsocketclient.h)