|
|
@ -36,6 +36,10 @@ include(VSForceXPToolchain) # Force XP toolchain for Visual Studio |
|
|
|
|
|
|
|
|
|
|
|
project (HLSDK-PORTABLE) |
|
|
|
project (HLSDK-PORTABLE) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Xash3D FWGS Library Naming Scheme compliance |
|
|
|
|
|
|
|
# see documentation: https://github.com/FWGS/xash3d-fwgs/blob/master/Documentation/extensions/library-naming.md |
|
|
|
|
|
|
|
include(LibraryNaming) |
|
|
|
|
|
|
|
|
|
|
|
#-------------- |
|
|
|
#-------------- |
|
|
|
# USER DEFINES \ |
|
|
|
# USER DEFINES \ |
|
|
|
################\ |
|
|
|
################\ |
|
|
@ -47,17 +51,13 @@ option(USE_VOICEMGR "Enable VOICE MANAGER." OFF) |
|
|
|
option(BUILD_CLIENT "Build client dll" ON) |
|
|
|
option(BUILD_CLIENT "Build client dll" ON) |
|
|
|
option(BUILD_SERVER "Build server dll" ON) |
|
|
|
option(BUILD_SERVER "Build server dll" ON) |
|
|
|
|
|
|
|
|
|
|
|
if (CMAKE_SIZEOF_VOID_P EQUAL 4 OR |
|
|
|
if (CMAKE_SIZEOF_VOID_P EQUAL 4 OR ((XASH_WIN32 OR XASH_LINUX) AND XASH_AMD64)) |
|
|
|
((WIN32 OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux") |
|
|
|
|
|
|
|
AND (CMAKE_SYSTEM_PROCESSOR STREQUAL "x64" |
|
|
|
|
|
|
|
OR CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" |
|
|
|
|
|
|
|
OR CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64"))) |
|
|
|
|
|
|
|
option(64BIT "Disable auto -m32 appending to compiler flags" OFF) |
|
|
|
option(64BIT "Disable auto -m32 appending to compiler flags" OFF) |
|
|
|
else() |
|
|
|
else() |
|
|
|
option(64BIT "Disable auto -m32 appending to compiler flags" ON) |
|
|
|
option(64BIT "Disable auto -m32 appending to compiler flags" ON) |
|
|
|
endif() |
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
|
|
if ((WIN32 OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR APPLE) AND NOT 64BIT) |
|
|
|
if ((XASH_WIN32 OR XASH_LINUX OR XASH_APPLE) AND ((XASH_AMD64 AND NOT 64BIT) OR XASH_X86)) |
|
|
|
option(GOLDSOURCE_SUPPORT "Build goldsource compatible client library" ON) |
|
|
|
option(GOLDSOURCE_SUPPORT "Build goldsource compatible client library" ON) |
|
|
|
else() |
|
|
|
else() |
|
|
|
option(GOLDSOURCE_SUPPORT "Build goldsource compatible client library" OFF) |
|
|
|
option(GOLDSOURCE_SUPPORT "Build goldsource compatible client library" OFF) |
|
|
@ -109,10 +109,6 @@ if(64BIT AND CMAKE_SIZEOF_VOID_P EQUAL 4) |
|
|
|
message(FATAL_ERROR "You enabled XASH_64BIT, but compiler can't create 64 bit code!") |
|
|
|
message(FATAL_ERROR "You enabled XASH_64BIT, but compiler can't create 64 bit code!") |
|
|
|
endif() |
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
|
|
# Xash3D FWGS Library Naming Scheme compliance |
|
|
|
|
|
|
|
# see documentation: https://github.com/FWGS/xash3d-fwgs/blob/master/Documentation/extensions/library-naming.md |
|
|
|
|
|
|
|
include(LibraryNaming) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8) |
|
|
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8) |
|
|
|
message(STATUS "Building for 64 Bit") |
|
|
|
message(STATUS "Building for 64 Bit") |
|
|
|
else() |
|
|
|
else() |
|
|
@ -131,7 +127,7 @@ else() |
|
|
|
add_definitions(-D_CRT_SILENCE_NONCONFORMING_TGMATH_H) |
|
|
|
add_definitions(-D_CRT_SILENCE_NONCONFORMING_TGMATH_H) |
|
|
|
endif() |
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
|
|
if(VITA) |
|
|
|
if(XASH_PSVITA) |
|
|
|
add_compile_options(-fno-use-cxa-atexit) |
|
|
|
add_compile_options(-fno-use-cxa-atexit) |
|
|
|
endif() |
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
|
|