aboutsummaryrefslogtreecommitdiff
path: root/examples/calculator
diff options
context:
space:
mode:
authorShatur95 <genaloner@gmail.com>2020-10-24 13:42:20 +0300
committerShatur95 <genaloner@gmail.com>2020-10-24 14:20:37 +0300
commit6c97f3e80de9c78b322617b8558bc34e978e29b9 (patch)
tree1665054400b6643fd938a2b3502f1c9e2f849e77 /examples/calculator
parentMerge pull request #118 from Shatur95/improve-qt6-support (diff)
downloadsingleapplication-6c97f3e80de9c78b322617b8558bc34e978e29b9.tar.xz
Add Qt6 configuration
Diffstat (limited to 'examples/calculator')
-rw-r--r--examples/calculator/CMakeLists.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/calculator/CMakeLists.txt b/examples/calculator/CMakeLists.txt
index 990bff5..82305f0 100644
--- a/examples/calculator/CMakeLists.txt
+++ b/examples/calculator/CMakeLists.txt
@@ -6,6 +6,9 @@ set(CMAKE_AUTOMOC ON)
# SingleApplication base class
set(QAPPLICATION_CLASS QApplication)
+add_subdirectory(../.. SingleApplication)
+
+find_package(Qt${QT_DEFAULT_MAJOR_VERSION} COMPONENTS Core REQUIRED)
add_executable(${PROJECT_NAME}
button.h
@@ -15,6 +18,4 @@ add_executable(${PROJECT_NAME}
main.cpp
)
-find_package(Qt5 COMPONENTS Widgets REQUIRED)
-add_subdirectory(../.. SingleApplication)
target_link_libraries(${PROJECT_NAME} SingleApplication::SingleApplication)