Skip to content

Commit

Permalink
Merge branch 'unifycode' into beta
Browse files Browse the repository at this point in the history
# Conflicts:
#	CMakeLists.txt
#	assets/japro/gfx/2d/charsgrid_med.tga
#	codemp/cgame/cg_consolecmds.c
#	codemp/cgame/cg_draw.c
#	codemp/cgame/cg_local.h
#	codemp/client/cl_console.cpp
#	codemp/game/g_xcvar.h
#	codemp/qcommon/q_shared.h
#	shared/sys/sys_main.cpp
  • Loading branch information
taysta committed Oct 29, 2023
2 parents b726a3c + 2db6216 commit 74d4e63
Show file tree
Hide file tree
Showing 254 changed files with 46,139 additions and 3,370 deletions.
48 changes: 43 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ option(BuildMPCGame "Whether to create projects for the MP clientside gamecode (
option(BuildMPUI "Whether to create projects for the MP UI code (uix86.dll)" ON)
option(BuildMPRend2 "Whether to create projects for the EXPERIMENTAL MP rend2 renderer (rd-rend2e_x86.dll)" ON)

option(BuildDiscordRichPresence "Whether to build with Discord Rich Presence integration" ON)
option(BuildDiscordRichPresence "Whether to build with Discord Rich Presence integration" OFF)

option(BuildTests "Whether to build automatic unit tests (requires Boost)" OFF)

Expand Down Expand Up @@ -71,6 +71,8 @@ endif()

if(APPLE)
set(UseInternalJPEGDefault ON)
set(UseInternalOpenALDefault ON)
set(UseInternalPNGDefault ON)
endif()

option(UseInternalOpenAL "If set, use bundled OpenAL." ${UseInternalOpenALDefault})
Expand Down Expand Up @@ -140,6 +142,11 @@ if(WIN32 AND CMAKE_VERSION VERSION_LESS "3.4")
message(WARNING "Building on Windows platform with CMake version less than 3.4 is deprecated. Manifest file will fail to be included.")
endif()

# Current Git SHA1 hash
include(GetGitRevisionDescription)
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
message(STATUS "Git revision is ${GIT_SHA1}")

#=============================================================================
#
# Binary names
Expand Down Expand Up @@ -236,12 +243,21 @@ elseif (("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") OR ("${CMAKE_C_COMPILER_ID}" M
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -ggdb")

if (X86)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2")
if (("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") OR ("${CMAKE_C_COMPILER_ID}" MATCHES "Clang"))
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2")
endif()
endif()

set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
if (("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") OR ("${CMAKE_C_COMPILER_ID}" MATCHES "Clang"))
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
else()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O2")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2")
endif()

# enable somewhat modern C++
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
Expand Down Expand Up @@ -273,6 +289,16 @@ elseif (("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") OR ("${CMAKE_C_COMPILER_ID}" M
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-comment")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsigned-char")
elseif("${CMAKE_C_COMPILER_ID}" STREQUAL "Intel")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -unroll")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -falign-stack=maintain-16-byte")
if ("${Architecture}" MATCHES "i386")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mia32")
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static-intel")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static-libstdc++")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static-libgcc")
endif()

if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
Expand All @@ -292,11 +318,23 @@ elseif (("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") OR ("${CMAKE_C_COMPILER_ID}" M
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-comment")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-invalid-offsetof")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsigned-char")
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden")
if ("${Architecture}" MATCHES "i386")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mia32")
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-intel")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libstdc++")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc")
endif()
else()
message(ERROR "Unsupported compiler")
endif()

if (NOT CMAKE_BUILD_TYPE)
message(STATUS "No build type selected, default to RELEASE")
set(CMAKE_BUILD_TYPE "RELEASE")
endif()
set(SharedDefines ${SharedDefines} "$<$<CONFIG:Debug>:_DEBUG>")
set(SharedDefines ${SharedDefines} "$<$<NOT:$<CONFIG:Debug>>:FINAL_BUILD>")

Expand Down
Binary file added assets/japro/gfx/2d/charsgrid_med_cyr.tga
Binary file not shown.
Binary file added assets/japro/gfx/2d/charsgrid_med_eng.tga
Binary file not shown.
Binary file not shown.
Binary file added assets/japro/gfx/Unbenannt-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/japro/gfx/Unbenannt-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/japro/gfx/new_scoreboard_header.tga
Binary file not shown.
Loading

0 comments on commit 74d4e63

Please sign in to comment.