-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
32 lines (23 loc) · 778 Bytes
/
CMakeLists.txt
File metadata and controls
32 lines (23 loc) · 778 Bytes
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
cmake_minimum_required(VERSION 3.5)
project(foo LANGUAGES CXX)
find_package(Qt5 COMPONENTS Core Quick REQUIRED)
set(CMAKE_AUTORCC ON)
add_executable(foo main.cpp qml.qrc)
target_compile_definitions(foo
PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>)
target_link_libraries(foo PRIVATE Qt5::Core Qt5::Quick)
IF(${CMAKE_SYSTEM_NAME} STREQUAL "iOS")
include(QtIosCMake/AddQtIosApp.cmake)
include(QtStaticCMake/QtStaticCMake.cmake)
qt_generate_plugin_import(foo VERBOSE)
qt_generate_qml_plugin_import(foo
QML_SRC ${CMAKE_CURRENT_SOURCE_DIR}
EXTRA_PLUGIN
QQuickLayoutsPlugin
VERBOSE
)
if(TARGET Qt5::QmlWorkerScript)
target_link_libraries(foo PRIVATE Qt5::QmlWorkerScript)
endif()
add_qt_ios_app(foo)
ENDIF()