mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 13:47:58 +03:00
Removed TARGET_GAME_TYPE definition
This commit is contained in:
parent
08fec1a8c5
commit
942bc9e523
4 changed files with 7 additions and 19 deletions
|
@ -5,23 +5,13 @@ include(TargetArch.cmake)
|
|||
|
||||
target_architecture(TARGET_ARCH)
|
||||
|
||||
|
||||
if(TARGET_GAME_TYPE)
|
||||
if(TARGET_GAME_TYPE EQUAL 1)
|
||||
# Build for Team Assault (Spearhead)
|
||||
set(TARGET_BASE_SUFFIX "ta")
|
||||
elseif(TARGET_GAME_TYPE EQUAL 2)
|
||||
# Build for Team Tactics (Breakthrough)
|
||||
set(TARGET_BASE_SUFFIX "tt")
|
||||
else()
|
||||
set(TARGET_BASE_SUFFIX)
|
||||
message(SEND_ERROR "Invalid game type. Game type can be 0, 1 or 2")
|
||||
endif()
|
||||
else()
|
||||
set(TARGET_BASE_SUFFIX)
|
||||
set(TARGET_GAME_TYPE 0)
|
||||
message(SEND_ERROR "TARGET_GAME_TYPE is now unsupported, it is now done at runtime.")
|
||||
endif()
|
||||
|
||||
set(TARGET_BASE_GAME "main${TARGET_BASE_SUFFIX}")
|
||||
|
||||
set(TARGET_BASE_GAME "main")
|
||||
|
||||
if(MSVC)
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE)
|
||||
|
@ -37,7 +27,7 @@ ELSE()
|
|||
set(TARGET_ARCH_SUFFIX ${TARGET_ARCH})
|
||||
ENDIF()
|
||||
|
||||
message(STATUS "Architecture detected: ${TARGET_ARCH}, suffix set to ${TARGET_ARCH_SUFFIX}")
|
||||
message(STATUS "Architecture detected: ${TARGET_ARCH}, suffix set to ${TARGET_ARCH_SUFFIX}.")
|
||||
|
||||
IF(WIN32)
|
||||
set(TARGET_PLATFORM_PREFIX "")
|
||||
|
|
|
@ -78,8 +78,6 @@ The installation directory can be set to MOHAA directory.
|
|||
|
||||
The client build can be built by adding `-DWITH_CLIENT=1` to the CMake command line. This will compile the cgame module and the full app with rendering, ui and sound suppport, alongside the dedicated server version.
|
||||
|
||||
To compile for either Spearhead or Breakthrough, append `-DTARGET_GAME_TYPE=x` where x can be 1 for Team Assault (Spearhead), and 2 for Team Tactics (Breakthrough). 2 is recommended because Team Tactics can connect to both Spearhead and Breakthrough servers.
|
||||
|
||||
### Linux
|
||||
|
||||
These are the tools required on Unix :
|
||||
|
|
|
@ -22,7 +22,7 @@ file(GLOB_RECURSE SOURCES_BG "../fgame/bg_misc.cpp" "../fgame/bg_pmove.cpp" "../
|
|||
file(GLOB_RECURSE SOURCES_CGAME "./*.c" "./*.cpp")
|
||||
|
||||
add_library(cgame SHARED ${SOURCES_CGAME} ${SOURCES_BG})
|
||||
target_compile_definitions(cgame PRIVATE CGAME_DLL TARGET_GAME_TYPE=${TARGET_GAME_TYPE})
|
||||
target_compile_definitions(cgame PRIVATE CGAME_DLL)
|
||||
target_compile_features(cgame PUBLIC cxx_nullptr)
|
||||
target_compile_features(cgame PUBLIC c_variadic_macros)
|
||||
target_link_libraries(cgame PUBLIC qcommon)
|
||||
|
|
|
@ -26,7 +26,7 @@ set(SOURCES_SHARED
|
|||
|
||||
add_library(qcommon INTERFACE)
|
||||
target_sources(qcommon INTERFACE ${SOURCES_SHARED})
|
||||
target_compile_definitions(qcommon INTERFACE TARGET_GAME_TYPE=${TARGET_GAME_TYPE})
|
||||
target_compile_definitions(qcommon INTERFACE)
|
||||
target_include_directories(qcommon INTERFACE "../qcommon" "../script")
|
||||
target_compile_features(qcommon INTERFACE cxx_nullptr)
|
||||
target_compile_features(qcommon INTERFACE c_variadic_macros)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue