Skip to content

Commit 6225457

Browse files
committed
[GEN][ZH] Remove "pragma comment" implict linker instructions. (#498)
Cleans up sub library naming as libraries are now named based on target name and don't vary based on build options.
1 parent f15498b commit 6225457

File tree

22 files changed

+4
-82
lines changed

22 files changed

+4
-82
lines changed

Generals/Code/GameEngine/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,10 +1059,6 @@ set(GAMEENGINE_SRC
10591059

10601060
add_library(g_gameengine STATIC)
10611061

1062-
set_target_properties(g_gameengine PROPERTIES OUTPUT_NAME
1063-
$<IF:$<CONFIG:Debug>,gameenginedebug,$<IF:$<BOOL:${GENZH_BUILD_INTERNAL}>,gameengineinternal,gameengine>>
1064-
)
1065-
10661062
target_sources(g_gameengine PRIVATE ${GAMEENGINE_SRC})
10671063

10681064
target_include_directories(g_gameengine PUBLIC

Generals/Code/GameEngine/Source/Common/System/GameMemory.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3242,23 +3242,6 @@ void MemoryPoolFactory::debugMemoryReport(Int flags, Int startCheckpoint, Int en
32423242
// GLOBAL FUNCTIONS
32433243
//-----------------------------------------------------------------------------
32443244

3245-
/*
3246-
This is a trick that is intended to force MSVC to link this file (and thus,
3247-
these definitions of new/delete) ahead of all others. (We do debug checking
3248-
to ensure that's the case)
3249-
*/
3250-
#if defined(_DEBUG)
3251-
#pragma comment(lib, "GameEngineDebug")
3252-
#elif defined(_INTERNAL)
3253-
#pragma comment(lib, "GameEngineInternal")
3254-
#else
3255-
#pragma comment(lib, "GameEngine")
3256-
#endif
3257-
3258-
#ifdef MEMORYPOOL_OVERRIDE_MALLOC
3259-
#pragma comment(linker, "/force:multiple")
3260-
#endif
3261-
32623245
static int theLinkTester = 0;
32633246

32643247
//-----------------------------------------------------------------------------

Generals/Code/GameEngine/Source/Common/System/StackDump.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@
2828

2929
#pragma pack(push, 8)
3030

31-
#pragma comment(linker, "/defaultlib:Dbghelp.lib")
32-
3331
#include "Common/StackDump.h"
3432
#include "Common/Debug.h"
3533

Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DGranny.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@
5454
#include "WW3D2/dx8wrapper.h"
5555
#include "WW3D2/scene.h"
5656

57-
#pragma comment( lib, "granny2" )
58-
5957
static granny_pnt332_vertex g_blendingBuffer[4096]; ///<temporary workspace for granny (all models < 4096 verts).
6058

6159
/** Local function used to find animation matching the given model */

Generals/Code/Main/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ endif()
99

1010
target_link_libraries(g_generals PRIVATE
1111
binkstub
12+
comctl32
1213
d3d8
1314
d3dx8
1415
dbghelplib

Generals/Code/Tools/MapCacheBuilder/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ target_include_directories(g_mapcachebuilder PRIVATE
1515
)
1616
#
1717
target_link_libraries(g_mapcachebuilder PRIVATE
18+
comctl32
1819
dbghelplib
1920
g_gameengine
2021
g_gameenginedevice

GeneralsMD/Code/GameEngine/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,10 +1142,6 @@ set(GAMEENGINE_SRC
11421142

11431143
add_library(z_gameengine STATIC)
11441144

1145-
set_target_properties(z_gameengine PROPERTIES OUTPUT_NAME
1146-
$<IF:$<CONFIG:Debug>,gameenginedebug,$<IF:$<BOOL:${GENZH_BUILD_INTERNAL}>,gameengineinternal,gameengine>>
1147-
)
1148-
11491145
target_sources(z_gameengine PRIVATE ${GAMEENGINE_SRC})
11501146

11511147
target_include_directories(z_gameengine PUBLIC

GeneralsMD/Code/GameEngine/Source/Common/System/GameMemory.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3230,23 +3230,6 @@ void MemoryPoolFactory::debugMemoryReport(Int flags, Int startCheckpoint, Int en
32303230
// GLOBAL FUNCTIONS
32313231
//-----------------------------------------------------------------------------
32323232

3233-
/*
3234-
This is a trick that is intended to force MSVC to link this file (and thus,
3235-
these definitions of new/delete) ahead of all others. (We do debug checking
3236-
to ensure that's the case)
3237-
*/
3238-
#if defined(_DEBUG)
3239-
#pragma comment(lib, "GameEngineDebug")
3240-
#elif defined(_INTERNAL)
3241-
#pragma comment(lib, "GameEngineInternal")
3242-
#else
3243-
#pragma comment(lib, "GameEngine")
3244-
#endif
3245-
3246-
#ifdef MEMORYPOOL_OVERRIDE_MALLOC
3247-
#pragma comment(linker, "/force:multiple")
3248-
#endif
3249-
32503233
static int theLinkTester = 0;
32513234

32523235
//-----------------------------------------------------------------------------

GeneralsMD/Code/GameEngine/Source/Common/System/StackDump.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@
2828

2929
#pragma pack(push, 8)
3030

31-
#pragma comment(linker, "/defaultlib:Dbghelp.lib")
32-
3331
#include "Common/StackDump.h"
3432
#include "Common/Debug.h"
3533

GeneralsMD/Code/GameEngineDevice/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ set(GAMEENGINEDEVICE_SRC
197197
)
198198

199199
add_library(z_gameenginedevice STATIC)
200-
set_target_properties(z_gameenginedevice PROPERTIES OUTPUT_NAME gameenginedevice)
201200

202201
target_sources(z_gameenginedevice PRIVATE ${GAMEENGINEDEVICE_SRC})
203202

0 commit comments

Comments
 (0)