forked from Ultimaker/cura-build-environment
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
99 lines (87 loc) · 2.73 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
# Copyright 2022 Ultimaker
# Setting the MACOSX_DEPLOYMENT_TARGET needs to be done before the first project() call. Setting this value should also
# take care of the CMAKE_OSX_SYSROOT. The variable is ignored on non-Apple systems.
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
include(GetFromEnvironmentOrCache)
GetFromEnvironmentOrCache(
NAME
CMAKE_OSX_DEPLOYMENT_TARGET
DESCRIPTION
"Specify the minimum version of the target platform (e.g. macOS or iOS)")
project(cura-build-environment)
cmake_minimum_required(VERSION 3.20)
include(cmake/conan.cmake)
include(cmake/os.cmake)
include(ExternalProject)
include(GNUInstallDirs)
# Create the version-related variables
GetFromEnvironmentOrCache(
NAME
CURA_VERSION_MAJOR
DEFAULT
"5"
DESCRIPTION
"Cura Major Version")
GetFromEnvironmentOrCache(
NAME
CURA_VERSION_MINOR
DEFAULT
"0"
DESCRIPTION
"Cura Minor Version")
GetFromEnvironmentOrCache(
NAME
CURA_VERSION_PATCH
DEFAULT
"0"
DESCRIPTION
"Cura Patch Version")
GetFromEnvironmentOrCache(
NAME
CURA_VERSION_PRE_RELEASE_TAG
DESCRIPTION
"Cura pre release tag Version Information a, b or rc")
GetFromEnvironmentOrCache(
NAME
CURA_VERSION_BUILD
DESCRIPTION
"Cura Version buildmetadata ignored when determining version precedence. Only used to identify a build.")
set(CURA_VERSION_EXTRA )
if(NOT ${CURA_VERSION_PRE_RELEASE_TAG} STREQUAL "")
set(CURA_VERSION_EXTRA "-${CURA_VERSION_PRE_RELEASE_TAG}+${CURA_VERSION_BUILD}")
endif()
set(_default_cura_version "${CURA_VERSION_MAJOR}.${CURA_VERSION_MINOR}.${CURA_VERSION_PATCH}${CURA_VERSION_EXTRA}")
GetFromEnvironmentOrCache(
NAME
CURA_VERSION
DEFAULT
${_default_cura_version}
DESCRIPTION
"Cura Extra Version Information"
REQUIRED)
include(projects/python.cmake)
include(projects/charon.cmake)
include(projects/savitar.cmake)
include(projects/arcus.cmake)
include(projects/uranium.cmake)
include(projects/libnest2d.cmake)
include(projects/pynest2d.cmake)
include(projects/curaengine.cmake)
include(projects/cura.cmake)
include(projects/fdm_materials.cmake)
include(projects/cura-binary-data.cmake)
# Collect the artifacts with pyinstaller
include(cmake/pyinstaller.cmake)
if(APPLE)
include(cmake/create-dmg.cmake)
include(cmake/sign-dmg.cmake)
include(cmake/notarize-dmg.cmake)
endif()
if(LINUX)
include(cmake/create-appimage.cmake)
include(cmake/sign-appimage.cmake)
endif()
if(WIN32)
include(cmake/nsis.cmake)
endif()
include(cmake/dev.cmake)