@@ -4,6 +4,7 @@ Having all [requirements](README.md#requirements) set, here you can find how to
4
4
5
5
## Table of contents
6
6
7
+ - [ TL;DR] ( #tldr )
7
8
- [ Build] ( #build )
8
9
- [ Execute] ( #execute )
9
10
- [ macOS] ( #macos )
@@ -12,6 +13,24 @@ Having all [requirements](README.md#requirements) set, here you can find how to
12
13
- [ Distribution] ( #distribution )
13
14
- [ Tests] ( #tests )
14
15
16
+ ## TL;DR
17
+
18
+ > [ !IMPORTANT]
19
+ > Workflow presets are only available in CMake version 3.25 and up.
20
+
21
+ The quickest way possible to get an actual distributable from zero is using the available CMake workflows. For Linux and
22
+ Windows:
23
+
24
+ ``` shell
25
+ cmake --workflow --preset dist
26
+ ```
27
+
28
+ And for macOS with Xcode:
29
+
30
+ ``` shell
31
+ cmake --workflow --preset xcode-dist
32
+ ```
33
+
15
34
## Build
16
35
17
36
Usually available build modes are ` Debug ` , ` Release ` , and ` RelWithDebInfo ` .
@@ -30,12 +49,14 @@ cmake -GNinja -DCMAKE_BUILD_TYPE=Release -B build/release
30
49
cmake --build build/release
31
50
```
32
51
33
- On macOS Xcode should be used as generator via ` -GXCode ` . For example creating a release build with XCode.
52
+ On macOS Xcode should be used as generator via ` -GXcode ` . For example creating a release build with XCode. It is also
53
+ necessary to specify the Apple architecture via ` CMAKE_OSX_ARCHITECTURES ` , for example for a universal executable using
54
+ the value ` x86_64;arm64" ` .
34
55
35
56
``` shell
36
- # Using Xcode
37
- cmake -GXcode -DCMAKE_BUILD_TYPE=Release -B build/xcode
38
- cmake --build build/xcode
57
+ # Using Xcode, create universal executable
58
+ cmake -GXcode -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES= " x86_64;arm64 " - B build/xcode
59
+ cmake --build build/xcode --config Release
39
60
```
40
61
41
62
## Execute
0 commit comments