forked from SnowyMouse/invader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdependencies.cmake
50 lines (41 loc) · 1.29 KB
/
dependencies.cmake
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
# SPDX-License-Identifier: GPL-3.0-only
# Run a dependency script if needed
if(DEFINED INVADER_BUILD_DEPENDENCY_SCRIPT)
set(INVADER_BUILD_DEPENDENCY_SCRIPT_PRE_RUN YES)
include(${INVADER_BUILD_DEPENDENCY_SCRIPT})
endif()
# Find some packages
find_package(Python3 REQUIRED)
find_package(Threads REQUIRED)
find_package(ZLIB REQUIRED)
find_package(LibArchive)
find_package(TIFF)
find_package(Freetype)
find_package(Git)
# Qt6
find_package(Qt6 COMPONENTS Core Widgets REQUIRED)
# SDL2
find_package(SDL2 REQUIRED)
# Load Rat In a Tube
option(INVADER_USE_SYSTEM_CORROSION "Use system installed corrosion package" ON)
if(INVADER_USE_SYSTEM_CORROSION)
find_package(Corrosion REQUIRED)
else()
include(FetchContent)
FetchContent_Declare(
Corrosion
GIT_REPOSITORY https://github.com/corrosion-rs/corrosion.git
GIT_TAG v0.4.4
)
FetchContent_MakeAvailable(Corrosion)
endif()
corrosion_import_crate(MANIFEST_PATH ext/riat/riatc/Cargo.toml)
# Audio things
set(DEP_AUDIO_LIBRARIES FLAC vorbisenc vorbisfile vorbis ogg samplerate)
# Set dependencies
set(DEP_SQUISH_LIBRARIES squish)
# Again, run a dependency script if needed
if(DEFINED INVADER_BUILD_DEPENDENCY_SCRIPT)
set(INVADER_BUILD_DEPENDENCY_SCRIPT_PRE_RUN NO)
include(${INVADER_BUILD_DEPENDENCY_SCRIPT})
endif()