diff --git a/2dlib/CMakeLists.txt b/2dlib/CMakeLists.txt index 038ebe05c..5821a3b9b 100644 --- a/2dlib/CMakeLists.txt +++ b/2dlib/CMakeLists.txt @@ -12,4 +12,5 @@ set(CPPS add_library(2dlib STATIC ${HEADERS} ${CPPS}) target_link_libraries(2dlib PRIVATE cfile + mem ) diff --git a/CMakeLists.txt b/CMakeLists.txt index 79a5a31cf..b05a66e98 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -149,8 +149,6 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") add_compile_options("/MP") # so msbuild builds with multiple processes endif() -add_compile_definitions($<$:MEM_USE_RTL>) - add_compile_definitions($<$:RELEASE>) add_compile_definitions($<$:_DEBUG>) diff --git a/bitmap/CMakeLists.txt b/bitmap/CMakeLists.txt index c3c592027..b646b6360 100644 --- a/bitmap/CMakeLists.txt +++ b/bitmap/CMakeLists.txt @@ -15,6 +15,7 @@ target_link_libraries(bitmap PRIVATE cfile ddebug ddio + mem stb ) target_include_directories(bitmap PUBLIC diff --git a/cfile/CMakeLists.txt b/cfile/CMakeLists.txt index 61959fa30..eea245a6e 100644 --- a/cfile/CMakeLists.txt +++ b/cfile/CMakeLists.txt @@ -7,6 +7,7 @@ set(CPPS add_library(cfile STATIC ${CPPS}) target_link_libraries(cfile PRIVATE ddio + mem ) target_include_directories(cfile PUBLIC $ PRIVATE ${PROJECT_BINARY_DIR}/lib # For d3_version.h ) +target_link_libraries(ddebug PRIVATE + mem +) diff --git a/ddio/CMakeLists.txt b/ddio/CMakeLists.txt index 857106f59..03b8ac0f2 100644 --- a/ddio/CMakeLists.txt +++ b/ddio/CMakeLists.txt @@ -24,8 +24,9 @@ set(CPPS > ) add_library(ddio STATIC ${CPPS}) -target_link_libraries(ddio +target_link_libraries(ddio PRIVATE ddebug + mem ) target_include_directories(ddio PUBLIC $:MEM_USE_RTL> +) +target_include_directories(mem PUBLIC + $ +) diff --git a/lib/mem.h b/mem/mem.h similarity index 100% rename from lib/mem.h rename to mem/mem.h diff --git a/model/CMakeLists.txt b/model/CMakeLists.txt index 6496b505d..b3e732774 100644 --- a/model/CMakeLists.txt +++ b/model/CMakeLists.txt @@ -6,4 +6,5 @@ set(CPPS add_library(model STATIC ${HEADERS} ${CPPS}) target_link_libraries(model PRIVATE ddio + mem ) diff --git a/movie/CMakeLists.txt b/movie/CMakeLists.txt index 0fae401c2..334a20711 100644 --- a/movie/CMakeLists.txt +++ b/movie/CMakeLists.txt @@ -6,4 +6,5 @@ add_library(movie STATIC ${HEADERS} ${CPPS}) target_link_libraries(movie PRIVATE ddio libmve + mem ) diff --git a/music/CMakeLists.txt b/music/CMakeLists.txt index 7799f629c..875a4a542 100644 --- a/music/CMakeLists.txt +++ b/music/CMakeLists.txt @@ -9,6 +9,7 @@ add_library(music STATIC ${HEADERS} ${CPPS}) target_link_libraries(music cfile ddio + mem sndlib stream_audio ) diff --git a/netcon/inetfile/CMakeLists.txt b/netcon/inetfile/CMakeLists.txt index 2e2edb714..7e8252007 100644 --- a/netcon/inetfile/CMakeLists.txt +++ b/netcon/inetfile/CMakeLists.txt @@ -6,3 +6,6 @@ set(CPPS inetgetfile.cpp) add_library(inetfile STATIC ${HEADERS} ${CPPS}) +target_link_libraries(inetfile PRIVATE + mem +) diff --git a/networking/CMakeLists.txt b/networking/CMakeLists.txt index 509284773..89b8bc002 100644 --- a/networking/CMakeLists.txt +++ b/networking/CMakeLists.txt @@ -1,14 +1,13 @@ set(HEADERS) set(CPPS - networking.cpp) - -set(PLATFORMCPPS) - -if(WIN32) - set(PLATFORMCPPS "directplay.cpp") -endif() + networking.cpp + $<$: + directplay.cpp + > +) -add_library(networking STATIC ${HEADERS} ${CPPS} ${PLATFORMCPPS}) +add_library(networking STATIC ${HEADERS} ${CPPS}) target_link_libraries(networking PRIVATE ddio + mem ) diff --git a/physics/CMakeLists.txt b/physics/CMakeLists.txt index 6a6fd011e..0d16f9fe1 100644 --- a/physics/CMakeLists.txt +++ b/physics/CMakeLists.txt @@ -8,5 +8,6 @@ set(CPPS add_library(physics STATIC ${HEADERS} ${CPPS}) target_link_libraries(physics PRIVATE ddio + mem sndlib ) diff --git a/renderer/CMakeLists.txt b/renderer/CMakeLists.txt index 636a09559..094d7cca3 100644 --- a/renderer/CMakeLists.txt +++ b/renderer/CMakeLists.txt @@ -27,4 +27,5 @@ add_library(renderer STATIC ${HEADERS} ${CPPS}) target_link_libraries(renderer PRIVATE bitmap ddio + mem ) diff --git a/sndlib/CMakeLists.txt b/sndlib/CMakeLists.txt index b9d8dc441..d9f7d119e 100644 --- a/sndlib/CMakeLists.txt +++ b/sndlib/CMakeLists.txt @@ -21,6 +21,7 @@ add_library(sndlib STATIC ${CPPS}) target_link_libraries(sndlib PRIVATE cfile ddio + mem stream_audio ) target_include_directories(sndlib PUBLIC diff --git a/stream_audio/CMakeLists.txt b/stream_audio/CMakeLists.txt index fc5dd3f19..b1d9abc38 100644 --- a/stream_audio/CMakeLists.txt +++ b/stream_audio/CMakeLists.txt @@ -7,6 +7,7 @@ add_library(stream_audio STATIC ${HEADERS} ${CPPS}) target_link_libraries(stream_audio PRIVATE ddio libacm + mem sndlib ) target_include_directories(stream_audio PUBLIC diff --git a/ui/CMakeLists.txt b/ui/CMakeLists.txt index 0350db8c9..6d47e421f 100644 --- a/ui/CMakeLists.txt +++ b/ui/CMakeLists.txt @@ -19,4 +19,5 @@ set(CPPS add_library(ui STATIC ${HEADERS} ${CPPS}) target_link_libraries(ui PRIVATE ddio + mem )