summaryrefslogtreecommitdiffstats
path: root/tests/libfuzzer/gui/text/qtextlayout
diff options
context:
space:
mode:
authorRobert Löhning <robert.loehning@qt.io>2021-05-27 21:29:39 +0200
committerRobert Löhning <robert.loehning@qt.io>2021-05-31 16:44:06 +0200
commit8b691ce24572f4709213d880c478e444feafe3fb (patch)
treeaff91156cf5d1a9f7bd2eb6fc062455e864b03f8 /tests/libfuzzer/gui/text/qtextlayout
parent4b0b87b5c2173ee70eacfdd7cea08aea8a5164c8 (diff)
Fuzzing: Add CMake project files for fuzz targets
Change-Id: Ied44bfd2c83d5590066146187a7333b677ceb179 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'tests/libfuzzer/gui/text/qtextlayout')
-rw-r--r--tests/libfuzzer/gui/text/qtextlayout/beginlayout/CMakeLists.txt47
1 files changed, 25 insertions, 22 deletions
diff --git a/tests/libfuzzer/gui/text/qtextlayout/beginlayout/CMakeLists.txt b/tests/libfuzzer/gui/text/qtextlayout/beginlayout/CMakeLists.txt
index 637ce2f51b..4a593d328a 100644
--- a/tests/libfuzzer/gui/text/qtextlayout/beginlayout/CMakeLists.txt
+++ b/tests/libfuzzer/gui/text/qtextlayout/beginlayout/CMakeLists.txt
@@ -1,30 +1,33 @@
-# Generated from beginlayout.pro.
+cmake_minimum_required(VERSION 3.14)
+project(beginlayout LANGUAGES CXX)
-#####################################################################
-## beginlayout Binary:
-#####################################################################
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
-qt_internal_add_executable(beginlayout
- GUI
- SOURCES
- main.cpp
- PUBLIC_LIBRARIES
- Qt::Gui
-)
-
-#### Keys ignored in scope 1:.:.:beginlayout.pro:<TRUE>:
-# FUZZ_ENGINE = "$$(LIB_FUZZING_ENGINE)"
-# QTPLUGIN = "qminimal"
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-## Scopes:
-#####################################################################
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
-qt_internal_extend_target(beginlayout CONDITION FUZZ_ENGINE_ISEMPTY
- LINK_OPTIONS
- "-fsanitize=fuzzer"
+qt_add_executable(beginlayout
+ main.cpp
)
-qt_internal_extend_target(beginlayout CONDITION NOT FUZZ_ENGINE_ISEMPTY
- PUBLIC_LIBRARIES
+target_link_libraries(beginlayout PUBLIC
+ Qt::Core
+ Qt::Gui
+)
+if(DEFINED ENV{LIB_FUZZING_ENGINE})
+ target_link_libraries(beginlayout PRIVATE
$ENV{LIB_FUZZING_ENGINE}
+ )
+else()
+ target_link_libraries(beginlayout PRIVATE
+ -fsanitize=fuzzer
+ )
+endif()
+
+qt_import_plugins(beginlayout
+ INCLUDE Qt::QMinimalIntegrationPlugin
)