summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2021-09-02 15:37:36 +0200
committerMichal Klocek <michal.klocek@qt.io>2021-09-04 07:15:50 +0200
commit7e2016039132538fedfe51e4be51998f9b7be929 (patch)
tree74d6f74d3fc810787904c96b813492c92febd303 /tests/auto
parent9f4713cdbe872a69ca0d257444e20ca9212cc33d (diff)
Fix automoc for test in case of topLevel build
In top level build , main configure can complain that moc does not exist during generator phase. Mark moc as enabled. Pick-to: 6.2 Change-Id: I55db6ada209939cc4cbedab4654b654cd741c535 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/httpserver/httpserver.cmake7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/auto/httpserver/httpserver.cmake b/tests/auto/httpserver/httpserver.cmake
index d67648f9c..84b350c0e 100644
--- a/tests/auto/httpserver/httpserver.cmake
+++ b/tests/auto/httpserver/httpserver.cmake
@@ -1,9 +1,5 @@
if (NOT TARGET Test::HttpServer)
- if(NOT QT_SUPERBUILD AND NOT QT_CONFIGURE_RUNNING)
- set(CMAKE_AUTOMOC ON)
- endif()
-
add_library(httpserver STATIC
${CMAKE_CURRENT_LIST_DIR}/httpreqrep.cpp
${CMAKE_CURRENT_LIST_DIR}/httpreqrep.h
@@ -13,6 +9,9 @@ if (NOT TARGET Test::HttpServer)
${CMAKE_CURRENT_LIST_DIR}/proxy_server.cpp
)
+ # moc binary might not exist in case of top level build
+ qt_autogen_tools(httpserver ENABLE_AUTOGEN_TOOLS "moc")
+
if(QT_FEATURE_ssl)
target_sources(httpserver INTERFACE ${CMAKE_CURRENT_LIST_DIR}/httpsserver.h)
endif()