File tree 3 files changed +25
-5
lines changed
3 files changed +25
-5
lines changed Original file line number Diff line number Diff line change 4
4
[submodule "IosCMakeToolchain "]
5
5
path = IosCMakeToolchain
6
6
url = https://github.com/OlivierLDff/IosCMakeToolchain
7
+ [submodule "QtStaticCMake "]
8
+ path = QtStaticCMake
9
+ url = https://github.com/OlivierLDff/QtStaticCMake
Original file line number Diff line number Diff line change @@ -6,18 +6,34 @@ find_package(Qt5 COMPONENTS Core Quick REQUIRED)
6
6
7
7
set (CMAKE_AUTORCC ON )
8
8
9
- add_executable (foo main.cpp qml.qrc)
9
+ set (addon_SRC)
10
+ IF (${CMAKE_SYSTEM_NAME} STREQUAL "iOS" )
11
+ set (addon_SRC
12
+ ${CMAKE_CURRENT_BINARY_DIR} /foo_plugin_import.cpp
13
+ ${CMAKE_CURRENT_BINARY_DIR} /foo_qml_plugin_import.cpp)
14
+ ENDIF ()
15
+ add_executable (foo main.cpp ${addon_SRC} qml.qrc)
10
16
11
17
12
18
target_compile_definitions (foo
13
19
PRIVATE $<$<OR :$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>)
14
20
15
- # conflict with AddQtIosApp.cmake
16
- target_link_libraries (foo PRIVATE Qt5::Core Qt5::Quick)
17
21
18
22
IF (${CMAKE_SYSTEM_NAME} STREQUAL "iOS" )
19
- # set(QT_LIBRARIES Qt5::Core Qt5::Quick)
23
+ set (QT_LIBRARIES Qt5::Core Qt5::Quick)
20
24
include (QtIosCMake/AddQtIosApp.cmake)
21
-
25
+ include (QtStaticCMake/QtStaticCMake.cmake)
22
26
add_qt_ios_app(foo)
27
+
28
+ qt_generate_plugin_import(foo
29
+ OUTPUT "foo_plugin_import.cpp"
30
+ VERBOSE)
31
+
32
+ qt_generate_qml_plugin_import(foo
33
+ QML_SRC "main.qml"
34
+ OUTPUT "foo_qml_plugin_import.cpp"
35
+ VERBOSE)
36
+ ELSE ()
37
+ # conflict with AddQtIosApp.cmake
38
+ target_link_libraries (foo PRIVATE Qt5::Core Qt5::Quick)
23
39
ENDIF ()
You can’t perform that action at this time.
0 commit comments