4
0
mirror of https://github.com/QuasarApp/QMLLoginView.git synced 2025-05-03 04:59:40 +00:00

41 lines
1.0 KiB
CMake
Raw Normal View History

2020-04-12 19:30:38 +03:00
#
2021-02-16 19:14:57 +03:00
# Copyright (C) 2018-2021 Yankovich Andrei (EndrII).
2020-04-12 19:30:38 +03:00
# Distributed under the lgplv3 software license, see the accompanying
# Everyone is permitted to copy and distribute verbatim copies
# of this license document, but changing it is not allowed.
#
cmake_minimum_required(VERSION 3.5)
2020-04-12 20:53:01 +03:00
project(ExampleLoginView LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
2020-12-27 15:40:03 +03:00
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core QuickControls2 REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core QuickControls2 REQUIRED)
if(ANDROID)
2021-04-16 16:40:24 +03:00
add_library(${PROJECT_NAME}
main.cpp
2020-05-24 22:49:26 +03:00
lv_example_res.qrc
)
else()
add_executable(${PROJECT_NAME}
main.cpp
2020-05-24 22:49:26 +03:00
lv_example_res.qrc
2020-04-12 21:30:07 +03:00
icon.rc
)
endif()
target_compile_definitions(${PROJECT_NAME}
PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>)
2020-12-27 15:40:03 +03:00
target_link_libraries(${PROJECT_NAME} PRIVATE Qt::Core Qt::QuickControls2 LoginView)