Build: Added user32.lib dependency to CMake

Also had to add ResetThink to cbase.h, as it was missing in deug.
This commit is contained in:
Jonathan Poncelet 2019-10-30 13:36:05 +00:00 committed by Alibek Omarov
parent aa7b5dc5ca
commit 71afe6e204
2 changed files with 5 additions and 0 deletions

View File

@ -125,6 +125,10 @@ if (GOLDSOURCE_SUPPORT)
target_link_libraries( ${CLDLL_LIBRARY} ${CMAKE_DL_LIBS} )
endif()
if(WIN32)
target_link_libraries( ${CLDLL_LIBRARY} user32.lib )
endif()
set_target_properties (${CLDLL_LIBRARY} PROPERTIES
POSITION_INDEPENDENT_CODE 1)

View File

@ -363,6 +363,7 @@ public:
#define SetTouch( a ) TouchSet( static_cast <void (CBaseEntity::*)(CBaseEntity *)> (a), #a )
#define SetUse( a ) UseSet( static_cast <void (CBaseEntity::*)( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )> (a), #a )
#define SetBlocked( a ) BlockedSet( static_cast <void (CBaseEntity::*)(CBaseEntity *)> (a), #a )
#define ResetThink() SetThink(NULL)
#else