summaryrefslogtreecommitdiffstats
path: root/examples/activeqt/qutlook/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/activeqt/qutlook/CMakeLists.txt')
-rw-r--r--examples/activeqt/qutlook/CMakeLists.txt34
1 files changed, 16 insertions, 18 deletions
diff --git a/examples/activeqt/qutlook/CMakeLists.txt b/examples/activeqt/qutlook/CMakeLists.txt
index 3373330..8cfbf9a 100644
--- a/examples/activeqt/qutlook/CMakeLists.txt
+++ b/examples/activeqt/qutlook/CMakeLists.txt
@@ -1,26 +1,31 @@
-# Generated from qutlook.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(qutlook 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}/activeqt/qutlook")
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Widgets)
-find_package(Qt6 COMPONENTS AxContainer)
+find_package(Qt6 REQUIRED COMPONENTS AxContainer Core Gui Widgets)
+
+qt_add_executable(qutlook
+ addressview.cpp addressview.h
+ main.cpp
+)
+set_target_properties(qutlook PROPERTIES
+ WIN32_EXECUTABLE TRUE
+ MACOSX_BUNDLE TRUE
)
+
+qt6_target_typelibs(qutlook LIBRARIES "msoutl:{00062FFF-0000-0000-C000-000000000046}")
+
target_link_libraries(qutlook PUBLIC
Qt::AxContainer
Qt::Core
@@ -28,13 +33,6 @@ target_link_libraries(qutlook PUBLIC
Qt::Widgets
)
-if(NOT TYPELIBS_ISEMPTY)
- target_sources(qutlook PUBLIC
- addressview.cpp addressview.h
- main.cpp
- )
-endif()
-
install(TARGETS qutlook
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"