From: Loïc Collignon Date: Thu, 7 Mar 2019 15:20:24 +0000 (+0100) Subject: Moved Qt's automoc and autorcc variables X-Git-Tag: 7.99.1~6 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=f5bb1d7d963450a77587df9cb7cd25fad7617097;p=src%2Flibafb-helpers.git 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 --- 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)