Merge pull request #18 from QuasarApp/cmake

first version cmake build system
This commit is contained in:
Andrei Yankovich 2019-08-31 19:03:36 +03:00 committed by GitHub
commit 6b429fb4e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 52 additions and 0 deletions

15
.gitignore vendored
View File

@ -44,3 +44,18 @@ CMakeLists.txt.user*
build/*
*.user*
#cmake
CMakeLists.txt.user
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
Makefile
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
_deps
*_autogen

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 b19c29180d406b88ab57f05f026c32ade0bfc5a3

33
CMakeLists.txt Normal file
View File

@ -0,0 +1,33 @@
#
# Copyright (C) 2018-2019 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.1)
project(QuasarApp 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 REQUIRED)
file(GLOB SOURCE_CPP
"*.cpp"
)
add_library(${PROJECT_NAME} SHARED ${SOURCE_CPP})
target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Core)
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
setVersion(1 2 0)