-
Notifications
You must be signed in to change notification settings - Fork 1
/
BUILD.txt
65 lines (43 loc) · 2.26 KB
/
BUILD.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
* Windows
To compile in Windows, you can use CMake or open the folder with Visual Studio 2022.
The easiest way to get the required dependencies is to use vcpkg.
vcpkg install physfs sfml ffmpeg --triplet=x86-windows
vcpkg install physfs sfml ffmpeg --triplet=x86-windows-static
vcpkg install physfs sfml ffmpeg --triplet=x64-windows
vcpkg install physfs sfml ffmpeg --triplet=x64-windows-static
There is a custom vcpkg triplet that links ffmpeg dynamically.
vcpkg install physfs sfml ffmpeg --triplet=x86-windows-static --overlay-triplets=vcpkg/triplets
vcpkg install physfs sfml ffmpeg --triplet=x64-windows-static --overlay-triplets=vcpkg/triplets
PhysicsFS - https://icculus.org/physfs
version >= 2.1
SFML - https://www.sfml-dev.org/
SFML 2.6.0
FFmpeg - https://ffmpeg.zeranoe.com/builds/
Get both shared and dev packages (version 3.x or 4.x)
* Linux
To compile in Linux (Ubuntu), you need gcc or clang with C++20 support
and to have both PhysicsFS >= 2.1 and SFML >= 2.6 installed.
Because SFML 2.6 is not yet released, you need to install it from source:
https://github.com/SFML/SFML/tree/2.6.0
For Ubuntu, you can see which dependencies are required by analysing the CI build scripts
under .github\workflows\*.yml
sudo apt install libphysfs-dev
sudo apt install libsfml-dev (skip this step until SFML 2.6 is released)
Optional (for movie support) FFmpeg:
sudo apt install libavdevice-dev libavformat-dev libavfilter-dev libavcodec-dev libswscale-dev libavutil-dev
* CMake
A CMake project file is provided.
Movie support is enabled by default, unless FFmpeg isn't found.
It will generate a project to compile on the target platform.
cmake CMakeLists.txt
cmake CMakeLists.txt -DDGENGINE_MOVIE_SUPPORT:BOOL=FALSE
Both PhysicsFS and SFML must be installed.
FFmpeg is also required for movie support.
For logging support: spdlog
For testing support: catch2
All the CMake properties and default values:
DGENGINE_BUILD_TEST_SUITE (FALSE) Build Tests
DGENGINE_ENABLE_LOGGING (FALSE) Enable Logging in release builds
DGENGINE_MOVIE_SUPPORT (TRUE) Enable Movie support
DGENGINE_FALLBACK_TO_LOWERCASE (TRUE) Enable falling back to all lowercase names if file is not found
DGENGINE_STATIC_CRT (FALSE) Use static CRT library (Windows)