-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
96 lines (85 loc) · 4.3 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# © Copyright 2010 - 2018 BlackTopp Studios Inc.
# This file is part of The Mezzanine Engine.
#
# The Mezzanine Engine is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# The Mezzanine Engine is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with The Mezzanine Engine. If not, see <http://www.gnu.org/licenses/>.
#
# The original authors have included a copy of the license specified above in the
# 'Docs' folder. See 'gpl.txt'
#
# We welcome the use of the Mezzanine engine to anyone, including companies who wish to
# Build professional software and charge for their product.
#
# However there are some practical restrictions, so if your project involves
# any of the following you should contact us and we will try to work something
# out:
# - DRM or Copy Protection of any kind(except Copyrights)
# - Software Patents You Do Not Wish to Freely License
# - Any Kind of Linking to Non-GPL licensed Works
# - Are Currently In Violation of Another Copyright Holder's GPL License
# - If You want to change our code and not add a few hundred MB of stuff to
# your distribution
#
# These and other limitations could cause serious legal problems if you ignore
# them, so it is best to simply contact us or the Free Software Foundation, if
# you have any questions.
#
# Joseph Toppi - toppij@gmail.com
# John Blackwood - makoenergy02@gmail.com
########################################################################################################################
cmake_minimum_required(VERSION 3.0)
project(SerializationBackendXML)
message(STATUS "${PROJECT_NAME} - Starting Configuration.")
############################################################################|###########################################
# Download, Verify and Setup the Jagati
if(NOT JAGATI_File)
set(JAGATI_File "${${PROJECT_NAME}_BINARY_DIR}/Jagati.cmake" CACHE FILEPATH
"The file to load the Jagati from and potentially to download it to.")
endif(NOT JAGATI_File)
if(NOT JAGATI_Download)
option(JAGATI_Download "Should the Jagati be downloaded automatically" ON)
endif(NOT JAGATI_Download)
if(JAGATI_Download)
set(JAGATI_Checksum "04ab32b7021c9ca0f1ccbda42bc0f3294a42002d1b27fe0814b\
b9d669ff4f84f5fbee1306a4841910c5aa84ec477980ade9219ad33d88b70984a7cc4dad8be61"
CACHE STRING "Check that when the Jagati is downloaded the right one is used (for consistency and security).")
set(JAGATI_Url "https://raw.githubusercontent.com/BlackToppStudios/Jagati/0.26.0/Jagati.cmake"
CACHE STRING "Where to download the Jagati from.")
file(DOWNLOAD "${JAGATI_Url}" "${JAGATI_File}" EXPECTED_HASH SHA512=${JAGATI_Checksum})
endif(JAGATI_Download)
include("${JAGATI_File}")
########################################################################################################################
# The rest of the Jagati setup
StandardJagatiSetup()
IncludeJagatiPackage("Foundation")
IncludeJagatiPackage("StaticFoundation")
IncludeJagatiPackage("Test")
########################################################################################################################
# Source files
message(STATUS "Determining Source Files.")
AddHeaderFile("SampleHeader.h")
ShowList("Header Files:" "\t" "${SerializationBackendXMLFiles}")
AddSourceFile("SampleSource.cpp")
ShowList("Source Files:" "\t" "${SerializationBackendXMLSourceFiles}")
AddJagatiDoxInput("Dox.h")
ShowList("Doxygen Input Files:" "\t" "${SerializationBackendXMLDoxFiles}")
########################################################################################################################
# Basic Targets and Test declaration
AddJagatiLibrary()
CreateCoverageTarget(${SerializationBackendXMLLib} "${SerializationBackendXMLSourceFiles}")
AddTestFile("SampleTest.h")
EmitTestCode()
AddTestTarget()
SetCodeCoverage()
AddIDEVisibility("Jenkinsfile")
message(STATUS "${PROJECT_NAME} - Ending Configuration.")