mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-27 07:04:16 +00:00
Fix compiling on MSVC2017
This commit is contained in:
parent
6d715cfea0
commit
3dda2ec590
@ -25,11 +25,22 @@ project (CLDLL)
|
|||||||
|
|
||||||
set (CLDLL_LIBRARY client)
|
set (CLDLL_LIBRARY client)
|
||||||
|
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-write-strings -DLINUX -D_LINUX -Dstricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -DCLIENT_WEAPONS -DCLIENT_DLL -w")
|
|
||||||
if (GOLDSOURCE_SUPPORT)
|
add_definitions(-DCLIENT_WEAPONS -DCLIENT_DLL)
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DGOLDSOURCE_SUPPORT")
|
|
||||||
|
if(NOT WIN32)
|
||||||
|
add_compile_options(-fno-exceptions) # GCC/Clang flag
|
||||||
|
add_compile_options(-Wno-write-strings) # GCC/Clang flag
|
||||||
|
add_definitions(-D_LINUX -DLINUX) # It seems enough for all non-Win32 systems
|
||||||
|
add_definitions(-Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf )
|
||||||
|
else()
|
||||||
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE)
|
||||||
endif()
|
endif()
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}")
|
|
||||||
|
if (GOLDSOURCE_SUPPORT)
|
||||||
|
add_definitions(-DGOLDSOURCE_SUPPORT)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
set (CLDLL_SOURCES
|
set (CLDLL_SOURCES
|
||||||
../dlls/crossbow.cpp
|
../dlls/crossbow.cpp
|
||||||
|
@ -25,8 +25,15 @@ project (SVDLL)
|
|||||||
|
|
||||||
set (SVDLL_LIBRARY server)
|
set (SVDLL_LIBRARY server)
|
||||||
|
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_LINUX -DCLIENT_WEAPONS -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf -fno-exceptions -w")
|
add_definitions(-DCLIENT_WEAPONS)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}")
|
|
||||||
|
if(NOT WIN32)
|
||||||
|
add_compile_options(-fno-exceptions) # GCC/Clang flag
|
||||||
|
add_definitions(-D_LINUX) # It seems enough for all non-Win32 systems
|
||||||
|
add_definitions(-Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf )
|
||||||
|
else()
|
||||||
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE)
|
||||||
|
endif()
|
||||||
|
|
||||||
set (SVDLL_SOURCES
|
set (SVDLL_SOURCES
|
||||||
agrunt.cpp
|
agrunt.cpp
|
||||||
|
Loading…
x
Reference in New Issue
Block a user