added cmake support

This commit is contained in:
Andrei Yankovich 2020-03-30 15:47:10 +03:00
parent 08824c8e61
commit 3586f4648a
3 changed files with 38 additions and 0 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "CMake"]
path = CMake
url = https://github.com/QuasarApp/CMake.git

1
CMake Submodule

@ -0,0 +1 @@
Subproject commit bd794b7bdedd54c19f714e60cd9d882c9ec11308

34
CMakeLists.txt Normal file
View File

@ -0,0 +1,34 @@
#
# Copyright (C) 2018-2020 QuasarApp.
# 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)
include(CMake/crossplatform/crossplatform.cmake)
project(QmlNotyfyService LANGUAGES CXX)
include(CMake/ProjectOut.cmake)
include(CMake/ccache.cmake)
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)
find_package(Qt5 COMPONENTS Core Quick REQUIRED)
file(GLOB SOURCE_CPP
"*.cpp" "*.qrc"
)
add_library(${PROJECT_NAME} SHARED ${SOURCE_CPP})
target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Core Qt5::Quick)
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
setVersion(1 0 1)