blob: 026e6eb4ace04e390474f0eec1afe5b006056b52 (
plain)
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
|
#
## ____ _
## / ___|__ _ __ _ _ __ ___ ___ ___ ___ __| | ___
##| | / _` |/ _` | '_ ` _ \ / _ \ / __/ _ \ / _` |/ _ \
##| |__| (_| | (_| | | | | | | __/ | (_| (_) | (_| | __/
## \____\__, |\__,_|_| |_| |_|\___| \___\___/ \__,_|\___|
## |___/
#
set(CMAKE_INSTALL_NAME_DIR ${PROJECT_BINARY_DIR}/gpp)
set(BG_SOURCE_DIR ../game)
set(QC_SOURCE_DIR ../qcommon)
set(UI_SOURCE_DIR ../ui)
set(RC_SOURCE_DIR ../renderercommon)
add_definitions( -DCGAME )
set( CGAME_SOURCES
cg_main.c # Must be listed first
cg_public.h
cg_local.h
binaryshader.h
${BG_SOURCE_DIR}/bg_lib.h
${BG_SOURCE_DIR}/bg_public.h
${BG_SOURCE_DIR}/bg_alloc.c
${BG_SOURCE_DIR}/bg_lib.c
${BG_SOURCE_DIR}/bg_misc.c
${BG_SOURCE_DIR}/bg_voice.c
${BG_SOURCE_DIR}/bg_pmove.c
${BG_SOURCE_DIR}/bg_slidemove.c
cg_animation.c
cg_animmapobj.c
cg_attachment.c
cg_buildable.c
cg_consolecmds.c
cg_draw.c
cg_drawtools.c
cg_ents.c
cg_event.c
cg_marks.c
cg_particles.c
cg_players.c
cg_playerstate.c
cg_predict.c
cg_rangemarker.c
cg_scanner.c
cg_servercmds.c
cg_snapshot.c
cg_trails.c
cg_tutorial.c
cg_view.c
cg_weapons.c
#
${UI_SOURCE_DIR}/ui_shared.h
${UI_SOURCE_DIR}/ui_shared.c
#
${QC_SOURCE_DIR}/q_shared.h
${QC_SOURCE_DIR}/q_shared.c
${QC_SOURCE_DIR}/q_math.c
#
${RC_SOURCE_DIR}/tr_types.h
)
add_library( cgame SHARED ${CGAME_SOURCES} cg_syscalls.c )
target_include_directories(
cgame PUBLIC
${BG_SOURCE_DIR}
${QC_SOURCE_DIR}
${RC_SOURCE_DIR}
${UI_SOURCE_DIR}
)
include( ${CMAKE_SOURCE_DIR}/cmake/AddQVM.cmake )
add_qvm( cgame ${CGAME_SOURCES} cg_syscalls.asm )
add_custom_command(
TARGET cgame POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy ${CMAKE_CURRENT_BINARY_DIR}/libcgame${CMAKE_SHARED_LIBRARY_SUFFIX} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/gpp/cgame${CMAKE_SHARED_LIBRARY_SUFFIX}
)
|