summaryrefslogtreecommitdiffstats
path: root/examples/serialport/cwriterasync/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/serialport/cwriterasync/CMakeLists.txt')
-rw-r--r--examples/serialport/cwriterasync/CMakeLists.txt11
1 files changed, 4 insertions, 7 deletions
diff --git a/examples/serialport/cwriterasync/CMakeLists.txt b/examples/serialport/cwriterasync/CMakeLists.txt
index 88438f78..ae729eef 100644
--- a/examples/serialport/cwriterasync/CMakeLists.txt
+++ b/examples/serialport/cwriterasync/CMakeLists.txt
@@ -1,29 +1,26 @@
cmake_minimum_required(VERSION 3.16)
project(cwriterasync 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/cwriterasync")
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS SerialPort)
+find_package(Qt6 REQUIRED COMPONENTS Core SerialPort)
qt_add_executable(cwriterasync
main.cpp
serialportwriter.cpp serialportwriter.h
)
+
set_target_properties(cwriterasync PROPERTIES
WIN32_EXECUTABLE FALSE
MACOSX_BUNDLE FALSE
)
+
target_link_libraries(cwriterasync PRIVATE
Qt::Core
Qt::SerialPort