mirror of
https://github.com/kevinbentley/Descent3.git
synced 2025-01-22 11:28:56 +00:00
Isolate misc module
Isolate misc module for better dependency handling.
This commit is contained in:
parent
1ed931ff60
commit
59487976f6
@ -13,4 +13,5 @@ add_library(2dlib STATIC ${HEADERS} ${CPPS})
|
||||
target_link_libraries(2dlib PRIVATE
|
||||
cfile
|
||||
mem
|
||||
misc
|
||||
)
|
||||
|
@ -37,14 +37,12 @@
|
||||
#include "args.h"
|
||||
#include "init.h"
|
||||
|
||||
#include "ddio.h"
|
||||
#include "osiris_dll.h"
|
||||
#include "loki_utils.h"
|
||||
|
||||
#include "log.h"
|
||||
|
||||
extern bool ddio_mouseGrabbed;
|
||||
int no_debug_dialog = 0;
|
||||
const char *DMFCGetString(int d);
|
||||
// void *x = (void *) DMFCGetString; // just force a reference to dmfc.so ...
|
||||
|
||||
|
@ -109,7 +109,6 @@ static int m_resource_language = 0;
|
||||
#define VENDOR_NEXGEN 5
|
||||
#define VENDOR_UNKNOWN 6
|
||||
|
||||
int no_debug_dialog = 0;
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Define our operating system specific extensions to the gameos system
|
||||
|
@ -16,6 +16,7 @@ target_link_libraries(bitmap PRIVATE
|
||||
ddebug
|
||||
ddio
|
||||
mem
|
||||
misc
|
||||
stb
|
||||
)
|
||||
target_include_directories(bitmap PUBLIC
|
||||
|
@ -8,6 +8,7 @@ add_library(cfile STATIC ${CPPS})
|
||||
target_link_libraries(cfile PRIVATE
|
||||
ddio
|
||||
mem
|
||||
misc
|
||||
)
|
||||
target_include_directories(cfile PUBLIC
|
||||
$<BUILD_INTERFACE:
|
||||
|
@ -6,3 +6,6 @@ set(CPPS
|
||||
HuffmanBasic.cpp)
|
||||
|
||||
add_library(czip STATIC ${HEADERS} ${CPPS})
|
||||
target_link_libraries(czip PRIVATE
|
||||
misc
|
||||
)
|
||||
|
@ -9,3 +9,6 @@ set(CPPS
|
||||
ddgrWin32Init.cpp)
|
||||
|
||||
add_library(dd_grwin32 STATIC ${HEADERS} ${CPPS})
|
||||
target_link_libraries(dd_grwin32 PRIVATE
|
||||
misc
|
||||
)
|
||||
|
@ -14,4 +14,7 @@ target_link_libraries(dd_video PRIVATE
|
||||
$<$<PLATFORM_ID:Linux,Darwin>:
|
||||
linux
|
||||
>
|
||||
$<$<PLATFORM_ID:Windows>:
|
||||
misc
|
||||
>
|
||||
)
|
||||
|
@ -20,4 +20,7 @@ target_include_directories(ddebug PUBLIC
|
||||
)
|
||||
target_link_libraries(ddebug PRIVATE
|
||||
mem
|
||||
$<$<PLATFORM_ID:Windows>:
|
||||
misc
|
||||
>
|
||||
)
|
||||
|
@ -197,6 +197,7 @@
|
||||
#include "debug.h"
|
||||
#include "mem.h"
|
||||
#include "mono.h"
|
||||
#include "pserror.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@ -1152,8 +1153,6 @@ const int NumCodeBytes = 16; // Number of code bytes to record.
|
||||
const int MaxStackDump = 2048; // Maximum number of DWORDS in stack dumps.
|
||||
const int StackColumns = 8; // Number of columns in stack dump.
|
||||
|
||||
extern int no_debug_dialog;
|
||||
|
||||
int __cdecl RecordExceptionInfo(PEXCEPTION_POINTERS data, const char *Message) {
|
||||
static int BeenHere;
|
||||
if (BeenHere) // Going recursive! That must mean this routine crashed!
|
||||
|
@ -26,6 +26,7 @@ add_library(ddio STATIC ${CPPS})
|
||||
target_link_libraries(ddio PRIVATE
|
||||
ddebug
|
||||
mem
|
||||
misc
|
||||
)
|
||||
target_include_directories(ddio PUBLIC
|
||||
$<BUILD_INTERFACE:
|
||||
|
@ -8,4 +8,5 @@ add_library(grtext STATIC ${HEADERS} ${CPPS})
|
||||
target_link_libraries(grtext PRIVATE
|
||||
ddio
|
||||
mem
|
||||
misc
|
||||
)
|
||||
|
@ -19,4 +19,5 @@ target_include_directories(linux PUBLIC
|
||||
)
|
||||
target_link_libraries(linux PRIVATE
|
||||
ddio
|
||||
misc
|
||||
)
|
||||
|
@ -26,6 +26,7 @@ target_link_libraries(manage PRIVATE
|
||||
cfile
|
||||
ddio
|
||||
mem
|
||||
misc
|
||||
sndlib
|
||||
stream_audio
|
||||
)
|
||||
|
@ -6,6 +6,9 @@ add_library(mem STATIC ${CPPS})
|
||||
target_compile_definitions(mem PUBLIC
|
||||
$<$<BOOL:${ENABLE_MEM_RTL}>:MEM_USE_RTL>
|
||||
)
|
||||
target_link_libraries(mem PRIVATE
|
||||
misc
|
||||
)
|
||||
target_include_directories(mem PUBLIC
|
||||
$<BUILD_INTERFACE:
|
||||
${PROJECT_SOURCE_DIR}/mem
|
||||
|
@ -1,15 +1,25 @@
|
||||
set(HEADERS)
|
||||
set(CPPS
|
||||
error.cpp
|
||||
logfile.cpp
|
||||
log.cpp
|
||||
psglob.cpp
|
||||
psrand.cpp
|
||||
pstring.cpp)
|
||||
pstring.cpp
|
||||
)
|
||||
|
||||
add_library(misc STATIC ${HEADERS} ${CPPS})
|
||||
|
||||
target_link_libraries(misc ddebug)
|
||||
add_library(misc STATIC ${CPPS})
|
||||
target_link_libraries(misc PRIVATE
|
||||
ddebug
|
||||
# For SDL_Assert()
|
||||
$<$<PLATFORM_ID:Darwin,Linux>:
|
||||
SDL2::SDL2
|
||||
>
|
||||
)
|
||||
target_include_directories(misc PUBLIC
|
||||
$<BUILD_INTERFACE:
|
||||
${PROJECT_SOURCE_DIR}/misc
|
||||
>
|
||||
)
|
||||
|
||||
if(BUILD_TESTING)
|
||||
add_subdirectory(tests)
|
||||
|
@ -114,7 +114,7 @@ bool error_Init(bool debugger, bool mono_debug, const char *app_title) {
|
||||
return true;
|
||||
}
|
||||
|
||||
extern int no_debug_dialog;
|
||||
int no_debug_dialog = 0;
|
||||
|
||||
// exits the application and prints out a standard error message
|
||||
void Error(const char *fmt, ...) {
|
||||
|
@ -151,6 +151,9 @@
|
||||
#include <assert.h>
|
||||
#include "debug.h"
|
||||
#include "mono.h"
|
||||
|
||||
extern int no_debug_dialog;
|
||||
|
||||
// initializes error handler.
|
||||
bool error_Init(bool debugger, bool mono_debug, const char *app_title);
|
||||
// exits the application and prints out a standard error message
|
@ -7,4 +7,5 @@ add_library(model STATIC ${HEADERS} ${CPPS})
|
||||
target_link_libraries(model PRIVATE
|
||||
ddio
|
||||
mem
|
||||
misc
|
||||
)
|
||||
|
@ -5,4 +5,5 @@ set(CPPS
|
||||
add_library(module STATIC ${HEADERS} ${CPPS})
|
||||
target_link_libraries(module PRIVATE
|
||||
ddio
|
||||
misc
|
||||
)
|
||||
|
@ -7,4 +7,5 @@ target_link_libraries(movie PRIVATE
|
||||
ddio
|
||||
libmve
|
||||
mem
|
||||
misc
|
||||
)
|
||||
|
@ -10,6 +10,7 @@ target_link_libraries(music
|
||||
cfile
|
||||
ddio
|
||||
mem
|
||||
misc
|
||||
sndlib
|
||||
stream_audio
|
||||
)
|
||||
|
@ -7,6 +7,7 @@ set_target_properties(Direct_TCP_IP PROPERTIES OUTPUT_NAME "Direct TCP~IP")
|
||||
target_link_libraries(Direct_TCP_IP PRIVATE
|
||||
ddio
|
||||
inetfile
|
||||
misc
|
||||
$<$<PLATFORM_ID:Windows>:ws2_32>
|
||||
)
|
||||
|
||||
|
@ -13,6 +13,7 @@ set_target_properties(Parallax_Online PROPERTIES OUTPUT_NAME "Parallax Online")
|
||||
target_link_libraries(Parallax_Online PRIVATE
|
||||
ddio
|
||||
inetfile
|
||||
misc
|
||||
$<$<PLATFORM_ID:Windows>:ws2_32>
|
||||
)
|
||||
|
||||
|
@ -8,5 +8,8 @@ set_target_properties(${NETGAME_MODULE} PROPERTIES CXX_VISIBILITY_PRESET "hidden
|
||||
set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "")
|
||||
set_target_properties(${NETGAME_MODULE} PROPERTIES SUFFIX ".d3m")
|
||||
|
||||
target_link_libraries(${NETGAME_MODULE} dmfc)
|
||||
target_link_libraries(${NETGAME_MODULE} PRIVATE
|
||||
dmfc
|
||||
misc
|
||||
)
|
||||
install(TARGETS "${NETGAME_MODULE}" DESTINATION ${CMAKE_INSTALL_LIBDIR}/netgames)
|
||||
|
@ -8,5 +8,8 @@ set_target_properties(${NETGAME_MODULE} PROPERTIES CXX_VISIBILITY_PRESET "hidden
|
||||
set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "")
|
||||
set_target_properties(${NETGAME_MODULE} PROPERTIES SUFFIX ".d3m")
|
||||
|
||||
target_link_libraries(${NETGAME_MODULE} dmfc)
|
||||
target_link_libraries(${NETGAME_MODULE} PRIVATE
|
||||
dmfc
|
||||
misc
|
||||
)
|
||||
install(TARGETS "${NETGAME_MODULE}" DESTINATION ${CMAKE_INSTALL_LIBDIR}/netgames)
|
||||
|
@ -8,5 +8,8 @@ set_target_properties(${NETGAME_MODULE} PROPERTIES CXX_VISIBILITY_PRESET "hidden
|
||||
set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "")
|
||||
set_target_properties(${NETGAME_MODULE} PROPERTIES SUFFIX ".d3m")
|
||||
|
||||
target_link_libraries(${NETGAME_MODULE} dmfc)
|
||||
target_link_libraries(${NETGAME_MODULE} PRIVATE
|
||||
dmfc
|
||||
misc
|
||||
)
|
||||
install(TARGETS "${NETGAME_MODULE}" DESTINATION ${CMAKE_INSTALL_LIBDIR}/netgames)
|
||||
|
@ -28,3 +28,6 @@ set(CPPS
|
||||
add_definitions(-DOUTRAGE_VERSION)
|
||||
|
||||
add_library(dmfc STATIC ${HEADERS} ${CPPS})
|
||||
target_link_libraries(dmfc PRIVATE
|
||||
misc
|
||||
)
|
||||
|
@ -8,5 +8,8 @@ set_target_properties(${NETGAME_MODULE} PROPERTIES CXX_VISIBILITY_PRESET "hidden
|
||||
set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "")
|
||||
set_target_properties(${NETGAME_MODULE} PROPERTIES SUFFIX ".d3m")
|
||||
|
||||
target_link_libraries(${NETGAME_MODULE} dmfc)
|
||||
target_link_libraries(${NETGAME_MODULE} PRIVATE
|
||||
dmfc
|
||||
misc
|
||||
)
|
||||
install(TARGETS "${NETGAME_MODULE}" DESTINATION ${CMAKE_INSTALL_LIBDIR}/netgames)
|
||||
|
@ -8,5 +8,8 @@ set_target_properties(${NETGAME_MODULE} PROPERTIES CXX_VISIBILITY_PRESET "hidden
|
||||
set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "")
|
||||
set_target_properties(${NETGAME_MODULE} PROPERTIES SUFFIX ".d3m")
|
||||
|
||||
target_link_libraries(${NETGAME_MODULE} dmfc)
|
||||
target_link_libraries(${NETGAME_MODULE} PRIVATE
|
||||
dmfc
|
||||
misc
|
||||
)
|
||||
install(TARGETS "${NETGAME_MODULE}" DESTINATION ${CMAKE_INSTALL_LIBDIR}/netgames)
|
||||
|
@ -8,5 +8,8 @@ set_target_properties(${NETGAME_MODULE} PROPERTIES CXX_VISIBILITY_PRESET "hidden
|
||||
set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "")
|
||||
set_target_properties(${NETGAME_MODULE} PROPERTIES SUFFIX ".d3m")
|
||||
|
||||
target_link_libraries(${NETGAME_MODULE} dmfc)
|
||||
target_link_libraries(${NETGAME_MODULE} PRIVATE
|
||||
dmfc
|
||||
misc
|
||||
)
|
||||
install(TARGETS "${NETGAME_MODULE}" DESTINATION ${CMAKE_INSTALL_LIBDIR}/netgames)
|
||||
|
@ -8,5 +8,8 @@ set_target_properties(${NETGAME_MODULE} PROPERTIES CXX_VISIBILITY_PRESET "hidden
|
||||
set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "")
|
||||
set_target_properties(${NETGAME_MODULE} PROPERTIES SUFFIX ".d3m")
|
||||
|
||||
target_link_libraries(${NETGAME_MODULE} dmfc)
|
||||
target_link_libraries(${NETGAME_MODULE} PRIVATE
|
||||
dmfc
|
||||
misc
|
||||
)
|
||||
install(TARGETS "${NETGAME_MODULE}" DESTINATION ${CMAKE_INSTALL_LIBDIR}/netgames)
|
||||
|
@ -8,5 +8,8 @@ set_target_properties(${NETGAME_MODULE} PROPERTIES CXX_VISIBILITY_PRESET "hidden
|
||||
set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "")
|
||||
set_target_properties(${NETGAME_MODULE} PROPERTIES SUFFIX ".d3m")
|
||||
|
||||
target_link_libraries(${NETGAME_MODULE} dmfc)
|
||||
target_link_libraries(${NETGAME_MODULE} PRIVATE
|
||||
dmfc
|
||||
misc
|
||||
)
|
||||
install(TARGETS "${NETGAME_MODULE}" DESTINATION ${CMAKE_INSTALL_LIBDIR}/netgames)
|
||||
|
@ -8,5 +8,8 @@ set_target_properties(${NETGAME_MODULE} PROPERTIES CXX_VISIBILITY_PRESET "hidden
|
||||
set_target_properties(${NETGAME_MODULE} PROPERTIES PREFIX "")
|
||||
set_target_properties(${NETGAME_MODULE} PROPERTIES SUFFIX ".d3m")
|
||||
|
||||
target_link_libraries(${NETGAME_MODULE} dmfc)
|
||||
target_link_libraries(${NETGAME_MODULE} PRIVATE
|
||||
dmfc
|
||||
misc
|
||||
)
|
||||
install(TARGETS "${NETGAME_MODULE}" DESTINATION ${CMAKE_INSTALL_LIBDIR}/netgames)
|
||||
|
@ -10,4 +10,5 @@ add_library(networking STATIC ${HEADERS} ${CPPS})
|
||||
target_link_libraries(networking PRIVATE
|
||||
ddio
|
||||
mem
|
||||
misc
|
||||
)
|
||||
|
@ -9,5 +9,6 @@ add_library(physics STATIC ${HEADERS} ${CPPS})
|
||||
target_link_libraries(physics PRIVATE
|
||||
ddio
|
||||
mem
|
||||
misc
|
||||
sndlib
|
||||
)
|
||||
|
@ -28,4 +28,5 @@ target_link_libraries(renderer PRIVATE
|
||||
bitmap
|
||||
ddio
|
||||
mem
|
||||
misc
|
||||
)
|
||||
|
@ -70,7 +70,10 @@ set(SCRIPTS
|
||||
|
||||
foreach(SCRIPT ${SCRIPTS})
|
||||
add_library(${SCRIPT} MODULE ${CPPS} "${SCRIPT}.cpp")
|
||||
target_link_libraries(${SCRIPT} fix)
|
||||
target_link_libraries(${SCRIPT}
|
||||
fix
|
||||
misc
|
||||
)
|
||||
set_target_properties(${SCRIPT} PROPERTIES PREFIX "")
|
||||
set_target_properties(${SCRIPT} PROPERTIES CXX_VISIBILITY_PRESET "hidden")
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
|
@ -22,6 +22,7 @@ target_link_libraries(sndlib PRIVATE
|
||||
cfile
|
||||
ddio
|
||||
mem
|
||||
misc
|
||||
stream_audio
|
||||
)
|
||||
target_include_directories(sndlib PUBLIC
|
||||
|
@ -8,6 +8,7 @@ target_link_libraries(stream_audio PRIVATE
|
||||
ddio
|
||||
libacm
|
||||
mem
|
||||
misc
|
||||
sndlib
|
||||
)
|
||||
target_include_directories(stream_audio PUBLIC
|
||||
|
@ -20,4 +20,5 @@ add_library(ui STATIC ${HEADERS} ${CPPS})
|
||||
target_link_libraries(ui PRIVATE
|
||||
ddio
|
||||
mem
|
||||
misc
|
||||
)
|
||||
|
@ -3,4 +3,7 @@ set(CPPS
|
||||
vector.cpp)
|
||||
|
||||
add_library(vecmat STATIC ${HEADERS} ${CPPS})
|
||||
target_link_libraries(vecmat fix)
|
||||
target_link_libraries(vecmat PRIVATE
|
||||
fix
|
||||
misc
|
||||
)
|
||||
|
@ -11,4 +11,5 @@ add_dependencies(win32 get_git_hash)
|
||||
target_include_directories(win32 PRIVATE ${PROJECT_BINARY_DIR}/lib)
|
||||
target_link_libraries(win32 PRIVATE
|
||||
ddio
|
||||
misc
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user