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.
|
|
|
|
#
|
|
|
|
|
2020-04-05 22:35:23 +03:00
|
|
|
cmake_minimum_required(VERSION 3.5)
|
|
|
|
|
2020-04-12 20:53:01 +03:00
|
|
|
project(ExampleLoginView LANGUAGES CXX)
|
2020-04-05 22:35:23 +03:00
|
|
|
|
|
|
|
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)
|
2020-04-05 22:35:23 +03:00
|
|
|
|
|
|
|
if(ANDROID)
|
2021-04-16 16:40:24 +03:00
|
|
|
add_library(${PROJECT_NAME}
|
2020-04-05 22:35:23 +03:00
|
|
|
main.cpp
|
2020-05-24 22:49:26 +03:00
|
|
|
lv_example_res.qrc
|
2020-04-05 22:35:23 +03:00
|
|
|
)
|
|
|
|
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
|
2020-04-05 22:35:23 +03:00
|
|
|
)
|
|
|
|
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)
|
2020-04-05 22:35:23 +03:00
|
|
|
|