Move debug functions to own module

This commit is part of efforts to isolate subsystems of project into own modules.
This commit is contained in:
Azamat H. Hackimov 2024-04-27 19:22:29 +03:00
parent b0cef3ff0e
commit 2aece028d0
15 changed files with 30 additions and 6 deletions

View File

@ -141,6 +141,7 @@ endif()
include_directories(
"cfile" # TODO: Remove after untying all modules
"ddebug" # -*-
"lib" # TODO: Remove after untying all modules
"Descent3"
${PLATFORM_INCLUDES}
@ -154,6 +155,7 @@ add_subdirectory(bitmap)
add_subdirectory(cfile)
add_subdirectory(czip)
add_subdirectory(d3music)
add_subdirectory(ddebug)
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
add_subdirectory(dd_grwin32)

View File

@ -299,7 +299,7 @@ add_executable(Descent3
${HEADERS} ${CPPS} ${PLATFORM_CPPS} ${INCS}
)
target_link_libraries(Descent3
2dlib AudioEncode bitmap cfile czip d3music ddio_common libmve libacm
2dlib AudioEncode bitmap cfile czip d3music ddebug ddio_common libmve libacm
fix grtext manage mem misc model module movie stream_audio
music networking physics renderer rtperformance sndlib ui unzip vecmat md5
${PLATFORM_LIBS})

View File

@ -10,4 +10,5 @@ set(CPPS
add_library(bitmap STATIC ${HEADERS} ${CPPS})
target_link_libraries(bitmap PRIVATE
cfile
ddebug
)

18
ddebug/CMakeLists.txt Normal file
View File

@ -0,0 +1,18 @@
set(CPPS
$<$<PLATFORM_ID:Darwin,Linux>:
lnxdebug.cpp
lnxmono.cpp
>
$<$<PLATFORM_ID:Windows>:
windebug.cpp
winmono.cpp
>
)
add_library(ddebug STATIC ${CPPS})
add_dependencies(ddebug get_git_hash)
target_include_directories(ddebug PUBLIC
$<BUILD_INTERFACE:
${PROJECT_SOURCE_DIR}/ddebug
>
)

View File

@ -13,3 +13,6 @@ set(CPPS
lnxkey_sdl.cpp)
add_library(ddio_lnx STATIC ${HEADERS} ${CPPS})
target_link_libraries(ddio_lnx
ddebug
)

View File

@ -2,11 +2,9 @@ set(HEADERS registry.h)
set(CPPS
lnxcon.cpp
lnxcon_raw.cpp
lnxdebug.cpp
lnxapp.cpp
lnxcon_null.cpp
lnxdata.cpp
lnxmono.cpp
registry.cpp)
# DynXLib.cpp
add_library(linux STATIC ${HEADERS} ${CPPS})

View File

@ -7,3 +7,6 @@ set(CPPS
pstring.cpp)
add_library(misc STATIC ${HEADERS} ${CPPS})
target_link_libraries(misc
ddebug
)

View File

@ -4,9 +4,8 @@ set(CPPS
wincon.cpp
WinController.cpp
windata.cpp
windebug.cpp
winmono.cpp
wintask.cpp)
wintask.cpp
)
add_library(win32 STATIC ${HEADERS} ${CPPS})
add_dependencies(win32 get_git_hash)