diff --git a/CMakeLists.txt b/CMakeLists.txt index db7f5917..1037eef8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/Descent3/CMakeLists.txt b/Descent3/CMakeLists.txt index e6a79fd7..224678c8 100644 --- a/Descent3/CMakeLists.txt +++ b/Descent3/CMakeLists.txt @@ -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}) diff --git a/bitmap/CMakeLists.txt b/bitmap/CMakeLists.txt index 4822c8f9..a599348a 100644 --- a/bitmap/CMakeLists.txt +++ b/bitmap/CMakeLists.txt @@ -10,4 +10,5 @@ set(CPPS add_library(bitmap STATIC ${HEADERS} ${CPPS}) target_link_libraries(bitmap PRIVATE cfile + ddebug ) diff --git a/ddebug/CMakeLists.txt b/ddebug/CMakeLists.txt new file mode 100644 index 00000000..570ddf91 --- /dev/null +++ b/ddebug/CMakeLists.txt @@ -0,0 +1,18 @@ +set(CPPS + $<$: + lnxdebug.cpp + lnxmono.cpp + > + $<$: + windebug.cpp + winmono.cpp + > +) + +add_library(ddebug STATIC ${CPPS}) +add_dependencies(ddebug get_git_hash) +target_include_directories(ddebug PUBLIC + $ +) diff --git a/lib/debug.h b/ddebug/debug.h similarity index 100% rename from lib/debug.h rename to ddebug/debug.h diff --git a/lib/debugbreak.h b/ddebug/debugbreak.h similarity index 100% rename from lib/debugbreak.h rename to ddebug/debugbreak.h diff --git a/linux/lnxdebug.cpp b/ddebug/lnxdebug.cpp similarity index 100% rename from linux/lnxdebug.cpp rename to ddebug/lnxdebug.cpp diff --git a/linux/lnxmono.cpp b/ddebug/lnxmono.cpp similarity index 100% rename from linux/lnxmono.cpp rename to ddebug/lnxmono.cpp diff --git a/lib/mono.h b/ddebug/mono.h similarity index 100% rename from lib/mono.h rename to ddebug/mono.h diff --git a/win32/windebug.cpp b/ddebug/windebug.cpp similarity index 100% rename from win32/windebug.cpp rename to ddebug/windebug.cpp diff --git a/win32/winmono.cpp b/ddebug/winmono.cpp similarity index 100% rename from win32/winmono.cpp rename to ddebug/winmono.cpp diff --git a/ddio_lnx/CMakeLists.txt b/ddio_lnx/CMakeLists.txt index 8f00107e..5ce7c131 100644 --- a/ddio_lnx/CMakeLists.txt +++ b/ddio_lnx/CMakeLists.txt @@ -13,3 +13,6 @@ set(CPPS lnxkey_sdl.cpp) add_library(ddio_lnx STATIC ${HEADERS} ${CPPS}) +target_link_libraries(ddio_lnx + ddebug +) diff --git a/linux/CMakeLists.txt b/linux/CMakeLists.txt index 460e945f..0f982db6 100644 --- a/linux/CMakeLists.txt +++ b/linux/CMakeLists.txt @@ -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}) diff --git a/misc/CMakeLists.txt b/misc/CMakeLists.txt index b33800bd..8f4cad01 100644 --- a/misc/CMakeLists.txt +++ b/misc/CMakeLists.txt @@ -7,3 +7,6 @@ set(CPPS pstring.cpp) add_library(misc STATIC ${HEADERS} ${CPPS}) +target_link_libraries(misc + ddebug +) diff --git a/win32/CMakeLists.txt b/win32/CMakeLists.txt index 380b9ffa..8259e0a8 100644 --- a/win32/CMakeLists.txt +++ b/win32/CMakeLists.txt @@ -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)