diff --git a/CMakeLists.txt b/CMakeLists.txt index 3403cfbd..705025bf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,6 +32,7 @@ project (HLSDK-XASH3D) #-------------- # USER DEFINES \ ################\ +option(64BIT "Allow 64 Bit builds" OFF) option(USE_VGUI "Enable VGUI1. UNDONE" OFF) option(USE_VGUI2 "Enable VGUI2. UNDONE" OFF) option(USE_VOICEMGR "Enable VOICE MANAGER." OFF) @@ -50,7 +51,7 @@ set(SERVER_LIBRARY_NAME "hl" CACHE STRING "Library name for Linux/MacOS/Windows" set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/") # Build 32-bit Xash on 64-bit, because Xash3D not support this -if(CMAKE_SIZEOF_VOID_P EQUAL 8) +if(CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT 64BIT) if(MSVC) error("UNDONE: set 32 build flags") else() diff --git a/cl_dll/CMakeLists.txt b/cl_dll/CMakeLists.txt index 05990913..b848aa6c 100644 --- a/cl_dll/CMakeLists.txt +++ b/cl_dll/CMakeLists.txt @@ -125,8 +125,13 @@ set_target_properties (${CLDLL_LIBRARY} PROPERTIES POSITION_INDEPENDENT_CODE 1) if(APPLE OR WIN32 OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + set(CLDLL_NAME "client") + if(64BIT) + set(CLDLL_NAME "client64") + endif() + set_target_properties(${CLDLL_LIBRARY} PROPERTIES - OUTPUT_NAME "client" + OUTPUT_NAME ${CLDLL_NAME} PREFIX "") endif() diff --git a/dlls/CMakeLists.txt b/dlls/CMakeLists.txt index bf7d3370..55370eeb 100644 --- a/dlls/CMakeLists.txt +++ b/dlls/CMakeLists.txt @@ -157,8 +157,13 @@ set_target_properties (${SVDLL_LIBRARY} PROPERTIES POSITION_INDEPENDENT_CODE 1) if(APPLE OR WIN32 OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + set(SVDLL_NAME "${SERVER_LIBRARY_NAME}") + if(64BIT) + set(SVDLL_NAME "${SERVER_LIBRARY_NAME}64") + endif() + set_target_properties(${SVDLL_LIBRARY} PROPERTIES - OUTPUT_NAME ${SERVER_LIBRARY_NAME} + OUTPUT_NAME ${SVDLL_NAME} PREFIX "") endif()