SimpleQmlNotify/CMakeLists.txt

55 lines
1.9 KiB
CMake
Raw Normal View History

2020-03-30 15:47:10 +03:00
#
2021-01-31 19:57:49 +03:00
# Copyright (C) 2018-2021 QuasarApp.
2020-03-30 15:47:10 +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)
project(QmlNotyfyService LANGUAGES CXX)
2021-04-20 18:26:18 +03:00
include(CMake/QuasarApp.cmake)
2020-03-30 15:47:10 +03:00
include(CMake/Version.cmake)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
2021-04-15 16:54:42 +03:00
add_definitions(-DQMLNOTYFYSERICE_LIBRARY)
2020-04-06 00:26:12 +03:00
2021-05-07 22:36:12 +03:00
set(QML_IMPORT_PATH ${QML_IMPORT_PATH} "${CMAKE_CURRENT_SOURCE_DIR}" CACHE STRING "" FORCE)
2020-04-06 00:26:12 +03:00
2021-06-04 13:38:20 +03:00
if (NOT QT_VERSION_MAJOR)
2021-06-04 13:24:27 +03:00
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Quick QuickControls2 REQUIRED)
endif()
2021-05-31 12:19:23 +03:00
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Quick QuickControls2 REQUIRED)
2020-03-30 15:47:10 +03:00
2020-05-03 20:38:17 +03:00
file(GLOB SOURCE_CPP "*.cpp" "*.qrc")
2020-03-30 15:47:10 +03:00
2021-05-05 16:12:50 +03:00
add_library(${PROJECT_NAME} ${SOURCE_CPP})
2021-05-31 12:19:23 +03:00
target_link_libraries(${PROJECT_NAME} PUBLIC Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Quick Qt${QT_VERSION_MAJOR}::QuickControls2)
2020-03-30 15:47:10 +03:00
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
2021-05-05 16:12:50 +03:00
set(LANGS ${CMAKE_CURRENT_SOURCE_DIR}/qmlNotify_languages/en.ts
${CMAKE_CURRENT_SOURCE_DIR}/qmlNotify_languages/ru.ts
${CMAKE_CURRENT_SOURCE_DIR}/qmlNotify_languages/uk.ts
2021-05-05 16:12:50 +03:00
${CMAKE_CURRENT_SOURCE_DIR}/qmlNotify_languages/ja.ts
${CMAKE_CURRENT_SOURCE_DIR}/qmlNotify_languages/tr.ts
${CMAKE_CURRENT_SOURCE_DIR}/qmlNotify_languages/zh.ts
${CMAKE_CURRENT_SOURCE_DIR}/qmlNotify_languages/de.ts
${CMAKE_CURRENT_SOURCE_DIR}/qmlNotify_languages/fr.ts
${CMAKE_CURRENT_SOURCE_DIR}/qmlNotify_languages/es.ts
${CMAKE_CURRENT_SOURCE_DIR}/qmlNotify_languages/pl.ts)
2021-05-05 16:12:50 +03:00
prepareQM( ${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR} "${LANGS}")
2020-03-30 15:47:10 +03:00
setVersion(1 0 1)
2021-04-15 16:07:41 +03:00
initAll()
addDoc("QmlNotyfyService" ${CMAKE_CURRENT_SOURCE_DIR}/doxygen.conf)