-
Notifications
You must be signed in to change notification settings - Fork 43
/
CMakeLists.txt
82 lines (65 loc) · 2.71 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
cmake_minimum_required(VERSION 3.24)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/deps/cyberpunk_cmake")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/deps/red4ext.sdk/cmake")
include(ConfigureVersionFromGit)
configure_version_from_git()
project(let_there_be_flight VERSION ${GIT_VERSION_MAJOR}.${GIT_VERSION_MINOR}.${GIT_VERSION_PATCH} LANGUAGES NONE)
include(CyberpunkMod)
configure_mod(
NAME "Let There Be Flight"
SLUG ${PROJECT_NAME}
PREFIX LTBF
AUTHOR "Jack Humbert"
URL "https://github.com/jackhumbert/let_there_be_flight"
LICENSE "Licensed under the MIT license. See the license.md in the root project for details."
)
set(LOAD_TWEAKS_FROM_RED4EXT ON)
set(LOAD_ARCHIVES_FROM_RED4EXT ON)
set(LOAD_INPUTS_FROM_RED4EXT ON)
set(LOAD_REDSCRIPT_FROM_RED4EXT ON)
find_program(ZOLTAN_CLANG_EXE NAMES zoltan-clang.exe PATHS "${MOD_TOOLS_DIR}" CACHE)
find_program(REDSCRIPT_CLI_EXE NAMES redscript-cli.exe PATHS "${MOD_TOOLS_DIR}" CACHE)
find_program(CYBERPUNK_2077_EXE NAMES Cyberpunk2077.exe PATHS "${CYBERPUNK_2077_GAME_DIR}/bin/x64" CACHE DOC "Cyberpunk2077.exe Executable File")
set(MOD_GAME_DIR_FMOD_FOLDER "${MOD_GAME_DIR}/red4ext/plugins/${MOD_SLUG}")
set(LTBF_SOURCE_FMOD_DIR "${PROJECT_SOURCE_DIR}/src/fmod_studio/Build/Desktop")
set(ZOLTAN_CLANG_EXE "C:/Users/Jack/Documents/cyberpunk/zoltan/target/release/zoltan-clang.exe")
# FMOD
file(GLOB LTBF_SOURCE_FMOD_FILES ${LTBF_SOURCE_FMOD_DIR}/*)
foreach(_FILE ${LTBF_SOURCE_FMOD_FILES})
file(RELATIVE_PATH _TEMPFILE ${LTBF_SOURCE_FMOD_DIR} ${_FILE})
configure_mod_file(/src/fmod_studio/Build/Desktop/${_TEMPFILE} red4ext/plugins/${MOD_SLUG}/${_TEMPFILE})
endforeach()
configure_red4ext(src/red4ext)
configure_red4ext_addresses(Addresses.hpp)
configure_tweaks(src/tweaks)
configure_archives(src/wolvenkit/packed/archive/pc/mod/let_there_be_flight.archive src/archive_xl/let_there_be_flight.archive.xl)
find_package(Detours)
find_package(FMOD)
find_package(Spdlog)
find_package(RedLib)
find_package(PhysX3)
find_package(ModSettings)
find_package(InputLoader)
find_package(ArchiveXL)
find_package(TweakXL)
target_link_libraries(let_there_be_flight.dll
PUBLIC
Detours
FMOD
spdlog
RedLib
PhysX3
input_loader.dll
ArchiveXL
TweakXL
)
# configure_inputs(src/input_loader/let_there_be_flight.xml)
configure_mod_file(src/input_loader/${MOD_SLUG}.xml red4ext/plugins/${MOD_SLUG}/inputs.xml)
configure_redscript(src/redscript)
target_link_libraries(${MOD_SLUG}.packed.reds PUBLIC mod_settings.packed.reds)
configure_folder_file(readme.md)
configure_folder_file(license.md)
# configure_uninstall()
configure_release(${MOD_SLUG}_${MOD_VERSION_STR}.zip)
configure_install()