diff --git a/2dlib/CMakeLists.txt b/2dlib/CMakeLists.txt index 038ebe05..5821a3b9 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 79a5a31c..b05a66e9 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 c3c59202..b646b636 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 61959fa3..eea245a6 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 857106f5..03b8ac0f 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 6496b505..b3e73277 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 0fae401c..334a2071 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 7799f629..875a4a54 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 2e2edb71..7e825200 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 50928477..89b8bc00 100644 --- a/networking/CMakeLists.txt +++ b/networking/CMakeLists.txt @@ -1,14 +1,13 @@ set(HEADERS) set(CPPS - networking.cpp) + networking.cpp + $<$: + directplay.cpp + > +) -set(PLATFORMCPPS) - -if(WIN32) - set(PLATFORMCPPS "directplay.cpp") -endif() - -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 6a6fd011..0d16f9fe 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 636a0955..094d7cca 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 b9d8dc44..d9f7d119 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 fc5dd3f1..b1d9abc3 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 0350db8c..6d47e421 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 )