aboutsummaryrefslogtreecommitdiff
path: root/examples/example_9_vCard
diff options
context:
space:
mode:
authorLinus Jahn <lnj@kaidan.im>2021-02-26 20:20:30 +0100
committerLinus Jahn <lnj@kaidan.im>2021-02-26 21:03:37 +0100
commit9a1134a415cd550dcb6efd35bd1cf98b8faa236e (patch)
tree92725cc756781f9cfa327fb59d41970d44f629c8 /examples/example_9_vCard
parentfbd0f2431d1fe753169244f912c6055236180d25 (diff)
downloadqxmpp-9a1134a415cd550dcb6efd35bd1cf98b8faa236e.tar.gz
cmake: Simplify Qt5/Qt6 handling
Diffstat (limited to 'examples/example_9_vCard')
-rw-r--r--examples/example_9_vCard/CMakeLists.txt7
1 files changed, 2 insertions, 5 deletions
diff --git a/examples/example_9_vCard/CMakeLists.txt b/examples/example_9_vCard/CMakeLists.txt
index f548fbbd..3e1ca7ee 100644
--- a/examples/example_9_vCard/CMakeLists.txt
+++ b/examples/example_9_vCard/CMakeLists.txt
@@ -1,7 +1,4 @@
-find_package(Qt6 QUIET COMPONENTS Gui)
-if(NOT Qt6_FOUND)
- find_package(Qt5 REQUIRED Gui)
-endif()
+find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Gui)
add_executable(9_vCard example_9_vCard.cpp)
-target_link_libraries(9_vCard ${QT_TARGET}::Gui qxmpp)
+target_link_libraries(9_vCard Qt${QT_VERSION_MAJOR}::Gui qxmpp)