blob: 4228052a26b6b8ef25c94d36e8d447c9f51f5d83 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
cmake_minimum_required(VERSION 3.16)
project(attachedstyleproperties LANGUAGES CXX)
set(CMAKE_AUTOMOC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quickcontrols/attachedstyleproperties")
find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml QuickControls2)
qt_standard_project_setup()
add_subdirectory(MyStyle)
qt_add_executable(attachedstylepropertiesexample
WIN32
MACOSX_BUNDLE
attachedstyleproperties.cpp
)
qt_add_qml_module(attachedstylepropertiesexample
URI App
QML_FILES
attachedstyleproperties.qml
NO_RESOURCE_TARGET_PATH
)
target_link_libraries(attachedstylepropertiesexample PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::QuickControls2
)
add_dependencies(attachedstylepropertiesexample MyStyle)
install(TARGETS attachedstylepropertiesexample
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
include(../../quick/shared/QtBundleQmlModuleForMacOS.cmake)
set(app_target "attachedstylepropertiesexample")
set(qml_plugin_target "MyStyleplugin")
set(qml_module_uri "MyStyle")
add_qml_module_to_macos_app_bundle(
"${app_target}" "${qml_plugin_target}" "${qml_module_uri}")
|