-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
29 lines (23 loc) · 809 Bytes
/
CMakeLists.txt
File metadata and controls
29 lines (23 loc) · 809 Bytes
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
file(GLOB_RECURSE SOURCES_LIST
"*.cpp"
)
file(GLOB_RECURSE HEADERS_LIST
"*.h"
)
function(BUILD_GAME GAME GAME_PATH SDK)
add_executable(DumpSource2-${GAME} ${SOURCES_LIST} ${HEADERS_LIST})
target_link_libraries(DumpSource2-${GAME} PRIVATE
HL2SDK-${SDK}
fmt::fmt
spdlog
nlohmann_json::nlohmann_json
${CMAKE_DL_LIBS}
)
target_compile_definitions(DumpSource2-${GAME} PRIVATE GAME_${GAME} GAME_PATH="${GAME_PATH}")
endfunction()
# build_game(GAME, GAME_PATH, SDK) - SDK selects which vendor/hl2sdk-* to link
build_game(CS2 csgo DOTA)
build_game(DOTA dota DOTA)
build_game(DEADLOCK citadel CS2)
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "Source Files" FILES ${SOURCES_LIST})
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "Header Files" FILES ${HEADERS_LIST})