Skip to content

Add support for compiling against the sdk2013 branch #173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jun 4, 2017
Prev Previous commit
Next Next commit
Fix compiling issues with the updated hl2sdk-sdk2013 branch
  • Loading branch information
TheCreeper committed Dec 15, 2016
commit 2b37a477ce0431cbffe3d61c7beddd4797be349b
8 changes: 4 additions & 4 deletions src/makefiles/linux/linux.base.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Set(SOURCEPYTHON_LINK_LIBRARIES
)


If(SOURCE_ENGINE MATCHES "bms")
If(SOURCE_ENGINE MATCHES "bms" OR SOURCE_ENGINE MATCHES "sdk2013")
Set(SOURCEPYTHON_LINK_LIBRARIES
"${SOURCEPYTHON_LINK_LIBRARIES}"
${SOURCESDK_LIB}/public/linux32/mathlib.a
Expand Down Expand Up @@ -96,12 +96,12 @@ EndIf()
# General definitions
Set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_LINUX -DPOSIX -DLINUX -DGNUC -DCOMPILER_GCC")

if(SOURCE_ENGINE MATCHES "orangebox" OR SOURCE_ENGINE MATCHES "bms")
if(SOURCE_ENGINE MATCHES "orangebox" OR SOURCE_ENGINE MATCHES "bms" OR SOURCE_ENGINE MATCHES "sdk2013")
Set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNO_MALLOC_OVERRIDE")
Endif()

# Function alias
If(NOT SOURCE_ENGINE MATCHES "bms")
If(NOT SOURCE_ENGINE MATCHES "bms" OR NOT SOURCE_ENGINE MATCHES "sdk2013")
Set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp")
Set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Dstrnicmp=strncasecmp -D_snprintf=snprintf")
Set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_vsnprintf=vsnprintf -D_alloca=alloca -Dstrcmpi=strcasecmp")
Expand All @@ -115,7 +115,7 @@ Set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-invalid-offsetof -Wno-reorder")

# Others
Set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpmath=sse -msse -m32 -fno-strict-aliasing")
Set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -fno-threadsafe-statics -v -fvisibility=hidden")
Set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -static-libgcc -static-libstdc++ -fno-threadsafe-statics -v -fvisibility=hidden")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

static-libstdc++ doesn't compile well with CS:GO. Once you start the server SP will fail to load with undefined symbol: _zdlpv.



# ------------------------------------------------------------------
Expand Down