-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
111 lines (85 loc) · 4.37 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# ######################################################################### #
# Georgiev Lab (c) 2015-2016 #
# ######################################################################### #
# Department of Cybernetics #
# Faculty of Applied Sciences #
# University of West Bohemia in Pilsen #
# ######################################################################### #
# #
# This file is part of CeCe. #
# #
# CeCe 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. #
# #
# CeCe 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 CeCe. If not, see <http://www.gnu.org/licenses/>. #
# #
# ######################################################################### #
cmake_minimum_required(VERSION 3.1)
# ######################################################################### #
set(CECE_VERSION_MAJOR 0)
set(CECE_VERSION_MINOR 6)
set(CECE_VERSION_PATCH 1)
set(CECE_VERSION ${CECE_VERSION_MAJOR}.${CECE_VERSION_MINOR}.${CECE_VERSION_PATCH})
# ######################################################################### #
option(CECE_BUILD_CLI "Build CLI application" On)
# ######################################################################### #
add_subdirectory(core)
add_subdirectory(plugins)
if (CECE_BUILD_CLI)
add_subdirectory(app/cli)
endif ()
# ######################################################################### #
install(
DIRECTORY examples/
DESTINATION examples
PATTERN ".git" EXCLUDE
)
# ######################################################################### #
# Build unit tests
# CECE_TESTS_BUILD is an option in CeCe-core
if (CECE_TESTS_BUILD)
enable_testing()
endif ()
# ######################################################################### #
# Configure file for travis-ci -> bintray deployment
if (UNIX AND NOT APPLE)
set(BINTRAY_PLATFORM "linux-x64")
elseif (APPLE)
set(BINTRAY_PLATFORM "macOS")
endif ()
set(BINTRAY_VERSION ${CECE_VERSION})
configure_file(resources/descriptor.json.in descriptor.json @ONLY)
# ######################################################################### #
include(InstallRequiredSystemLibraries)
set(SYSTEM_NAME ${CMAKE_SYSTEM_NAME})
if (${SYSTEM_NAME} MATCHES "Windows")
if (CMAKE_CL_64)
set(SYSTEM_NAME "Win64")
else ()
set(SYSTEM_NAME "Win32")
endif ()
endif ()
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "CeCe simulator")
set(CPACK_PACKAGE_VENDOR "Georgiev Lab")
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt")
set(CPACK_PACKAGE_NAME CeCe)
set(CPACK_PACKAGE_VERSION "${CECE_VERSION}")
set(CPACK_PACKAGE_VERSION_MAJOR ${CECE_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${CECE_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${CECE_VERSION_PATCH})
set(CPACK_PACKAGE_CONTACT "Jiří Fatka <[email protected]>")
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${SYSTEM_NAME}")
# ######################################################################### #
set(CPACK_STRIP_FILES "${INSTALL_DIR_RUNTIME}/${CMAKE_PROJECT_NAME}")
# ######################################################################### #
include(CPack)
# ######################################################################### #