summaryrefslogtreecommitdiffstats
path: root/examples/serialport/blockingreceiver/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/serialport/blockingreceiver/CMakeLists.txt')
-rw-r--r--examples/serialport/blockingreceiver/CMakeLists.txt13
1 files changed, 4 insertions, 9 deletions
diff --git a/examples/serialport/blockingreceiver/CMakeLists.txt b/examples/serialport/blockingreceiver/CMakeLists.txt
index 6e7ce13b..bc660624 100644
--- a/examples/serialport/blockingreceiver/CMakeLists.txt
+++ b/examples/serialport/blockingreceiver/CMakeLists.txt
@@ -1,32 +1,27 @@
cmake_minimum_required(VERSION 3.16)
project(blockingreceiver LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/serialport/blockingreceiver")
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Widgets)
-find_package(Qt6 COMPONENTS SerialPort)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui SerialPort Widgets)
qt_add_executable(blockingreceiver
dialog.cpp dialog.h
main.cpp
receiverthread.cpp receiverthread.h
)
+
set_target_properties(blockingreceiver PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(blockingreceiver PRIVATE
Qt::Core
Qt::Gui