From f5bb1d7d963450a77587df9cb7cd25fad7617097 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lo=C3=AFc=20Collignon?= Date: Thu, 7 Mar 2019 16:20:24 +0100 Subject: [PATCH] Moved Qt's automoc and autorcc variables MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- CMakeLists.txt | 9 +++++---- 1 file 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) -- 2.16.6