Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,6 @@ add_compile_definitions(
# SDK2013CE # Cut out since 2025-02-18 TF2 SDK Update
NEO
GLOWS_ENABLE
_DLL_EXT=${SRV_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}
_EXTERNAL_DLL_EXT=${SRV_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}
_GLIBCXX_USE_CXX11_ABI=0
FRAME_POINTER_OMISSION_DISABLED
SOURCE1=1
Expand Down
4 changes: 4 additions & 0 deletions src/game/client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,10 @@ target_sources_grouped(
weapons_resource.cpp
)

set_source_files_properties(cdll_client_int.cpp PROPERTIES
COMPILE_OPTIONS "-D_DLL_EXT=${SRV_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX};-D_EXTERNAL_DLL_EXT=${SRV_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}"
)

if(OS_LINUX)
target_sources_grouped(
TARGET client
Expand Down
2 changes: 2 additions & 0 deletions src/game/client/cdll_client_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,8 @@ class CClientDLLSharedAppSystems : public IClientDLLSharedAppSystems
public:
CClientDLLSharedAppSystems()
{
#define DLL_EXT_STRING DLLExtTokenPaste2( _DLL_EXT )

AddAppSystem( "soundemittersystem" DLL_EXT_STRING, SOUNDEMITTERSYSTEM_INTERFACE_VERSION );
AddAppSystem( "scenefilecache" DLL_EXT_STRING, SCENE_FILE_CACHE_INTERFACE_VERSION );
}
Expand Down
4 changes: 4 additions & 0 deletions src/game/server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,10 @@ target_sources_grouped(
world.h
)

set_source_files_properties(gameinterface.cpp PROPERTIES
COMPILE_OPTIONS "-D_DLL_EXT=${SRV_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX};-D_EXTERNAL_DLL_EXT=${SRV_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}"
)

if(OS_LINUX)
target_sources_grouped(
TARGET server
Expand Down
2 changes: 2 additions & 0 deletions src/game/server/gameinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3497,6 +3497,8 @@ class CServerDLLSharedAppSystems : public IServerDLLSharedAppSystems
public:
CServerDLLSharedAppSystems()
{
#define DLL_EXT_STRING DLLExtTokenPaste2( _DLL_EXT )

AddAppSystem( "soundemittersystem" DLL_EXT_STRING, SOUNDEMITTERSYSTEM_INTERFACE_VERSION );
AddAppSystem( "scenefilecache" DLL_EXT_STRING, SCENE_FILE_CACHE_INTERFACE_VERSION );
}
Expand Down
2 changes: 2 additions & 0 deletions src/public/filesystem_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1281,6 +1281,8 @@ FSReturnCode_t FileSystem_GetFileSystemDLLName( char *pFileSystemDLL, int nMaxLe
if ( !FileSystem_GetExecutableDir( executablePath, sizeof( executablePath ) ) )
return SetupFileSystemError( false, FS_INVALID_PARAMETERS, "FileSystem_GetExecutableDir failed." );

#define DLL_EXT_STRING DLLExtTokenPaste2( _DLL_EXT )

// Assume we'll use local files
Q_snprintf( pFileSystemDLL, nMaxLen, "%s%cfilesystem_stdio" DLL_EXT_STRING, executablePath, CORRECT_PATH_SEPARATOR );

Expand Down
1 change: 0 additions & 1 deletion src/public/tier0/basetypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
// This is a trick to get the DLL extension off the -D option on the command line.
#define DLLExtTokenPaste(x) #x
#define DLLExtTokenPaste2(x) DLLExtTokenPaste(x)
#define DLL_EXT_STRING DLLExtTokenPaste2( _DLL_EXT )


#include "protected_things.h"
Expand Down
4 changes: 4 additions & 0 deletions src/tier1/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ target_sources_grouped(
snappy-stubs-internal.cpp
)

set_source_files_properties(interface.cpp PROPERTIES
COMPILE_OPTIONS "-D_DLL_EXT=${SRV_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX};-D_EXTERNAL_DLL_EXT=${SRV_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}"
)

if(NOT SOURCESDK)
target_sources_grouped(
TARGET tier1
Expand Down
2 changes: 2 additions & 0 deletions src/tier1/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ uintp ThreadedLoadLibraryFunc( void *pParam )

HMODULE Sys_LoadLibrary( const char *pLibraryName, Sys_Flags flags )
{
#define DLL_EXT_STRING DLLExtTokenPaste2( _DLL_EXT )

char str[ 1024 ];
// Note: DLL_EXT_STRING can be "_srv.so" or "_360.dll". So be careful
// when using the V_*Extension* routines...
Expand Down
Loading