2023-05-10 00:05:38 +02:00
|
|
|
cmake_minimum_required( VERSION 3.16 )
|
2023-07-18 00:17:49 +02:00
|
|
|
|
|
|
|
macro( add_game_project PROJECT_NAME )
|
|
|
|
add_module( "lib" ${PROJECT_NAME} "vpc" ${FOLDER_CONTEXT} TRUE TRUE )
|
2023-05-10 00:05:38 +02:00
|
|
|
|
|
|
|
start_sources()
|
|
|
|
|
2023-07-18 21:05:29 +02:00
|
|
|
if( ${PROJECT_NAME} STREQUAL "game_shared_static" )
|
|
|
|
|
2023-05-10 00:05:38 +02:00
|
|
|
add_sources( SOURCE_GROUP "Shared"
|
|
|
|
"shared/ai_utility_shared.cpp"
|
|
|
|
"shared/ai_utility_shared.h"
|
|
|
|
"shared/animation.cpp"
|
|
|
|
"shared/animation.h"
|
|
|
|
"shared/collisionproperty.cpp"
|
|
|
|
"shared/collisionproperty.h"
|
|
|
|
"shared/ehandle.h"
|
|
|
|
"shared/entitylist_base.cpp"
|
|
|
|
"shared/entitylist_base.h"
|
|
|
|
"shared/imovehelper.h"
|
|
|
|
"shared/playernet_vars.h"
|
|
|
|
"shared/predictioncopy.h"
|
|
|
|
"shared/shared_classnames.h"
|
|
|
|
"shared/shareddefs.h"
|
|
|
|
"shared/takedamageinfo.h"
|
2023-06-05 01:24:23 +02:00
|
|
|
"shared/usercmd.cpp"
|
2023-05-10 00:05:38 +02:00
|
|
|
"shared/usercmd.h"
|
2023-06-12 02:02:29 +02:00
|
|
|
"shared/usermessages.h"
|
2023-05-10 00:05:38 +02:00
|
|
|
"shared/util_shared.cpp"
|
|
|
|
"shared/util_shared.h"
|
|
|
|
"shared/vscript_shared.cpp"
|
|
|
|
"shared/vscript_shared.h"
|
|
|
|
)
|
|
|
|
|
2023-05-31 23:58:10 +02:00
|
|
|
add_sources( SOURCE_GROUP "Shared/Weapon"
|
|
|
|
"shared/r1/weapon_bolt.cpp"
|
|
|
|
"shared/r1/weapon_bolt.h"
|
|
|
|
)
|
|
|
|
|
2023-07-18 21:05:29 +02:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if( ${PROJECT_NAME} STREQUAL "server_static" )
|
|
|
|
|
2024-04-05 18:33:33 +02:00
|
|
|
add_sources( SOURCE_GROUP "AI"
|
2023-05-10 00:05:38 +02:00
|
|
|
"server/ai_network.cpp"
|
|
|
|
"server/ai_network.h"
|
|
|
|
"server/ai_networkmanager.cpp"
|
|
|
|
"server/ai_networkmanager.h"
|
|
|
|
"server/ai_node.h"
|
|
|
|
"server/ai_utility.cpp"
|
|
|
|
"server/ai_utility.h"
|
2024-04-05 18:33:33 +02:00
|
|
|
"server/detour_impl.h"
|
|
|
|
)
|
|
|
|
|
|
|
|
add_sources( SOURCE_GROUP "Entity"
|
2023-05-10 00:05:38 +02:00
|
|
|
"server/baseanimating.cpp"
|
|
|
|
"server/baseanimating.h"
|
|
|
|
"server/baseanimatingoverlay.h"
|
|
|
|
"server/basecombatcharacter.h"
|
|
|
|
"server/baseentity.cpp"
|
|
|
|
"server/baseentity.h"
|
|
|
|
"server/entitylist.cpp"
|
|
|
|
"server/entitylist.h"
|
2023-08-27 00:20:23 +02:00
|
|
|
"server/entityoutput.cpp"
|
|
|
|
"server/entityoutput.h"
|
2024-04-05 18:33:33 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
add_sources( SOURCE_GROUP "Network"
|
2023-05-10 00:05:38 +02:00
|
|
|
"server/networkproperty.cpp"
|
|
|
|
"server/networkproperty.h"
|
2024-04-05 18:33:33 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
add_sources( SOURCE_GROUP "Player"
|
2023-05-10 00:05:38 +02:00
|
|
|
"server/player.cpp"
|
|
|
|
"server/player.h"
|
|
|
|
"server/playerlocaldata.h"
|
2024-04-05 18:33:33 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
add_sources( SOURCE_GROUP "Script"
|
|
|
|
"server/vscript_server.cpp"
|
|
|
|
"server/vscript_server.h"
|
|
|
|
)
|
|
|
|
|
|
|
|
add_sources( SOURCE_GROUP "Physics"
|
|
|
|
"server/physics_main.cpp"
|
|
|
|
"server/physics_main.h"
|
|
|
|
)
|
|
|
|
|
|
|
|
add_sources( SOURCE_GROUP "Utility"
|
|
|
|
"server/cbase.cpp"
|
|
|
|
"server/cbase.h"
|
|
|
|
"server/gameinterface.cpp"
|
|
|
|
"server/gameinterface.h"
|
|
|
|
"server/movehelper_server.cpp"
|
|
|
|
"server/movehelper_server.h"
|
2023-07-19 02:27:28 +02:00
|
|
|
"server/util_server.cpp"
|
|
|
|
"server/util_server.h"
|
2023-08-27 00:20:23 +02:00
|
|
|
"server/variant_t.cpp"
|
|
|
|
"server/variant_t.h"
|
2024-04-05 18:33:33 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
add_sources( SOURCE_GROUP "LiveAPI"
|
|
|
|
"server/liveapi/liveapi.cpp"
|
|
|
|
"server/liveapi/liveapi.h"
|
2023-05-10 00:05:38 +02:00
|
|
|
)
|
|
|
|
|
2023-07-18 00:17:49 +02:00
|
|
|
add_sources( SOURCE_GROUP "Public"
|
|
|
|
"${ENGINE_SOURCE_DIR}/public/iserverentity.h"
|
|
|
|
"${ENGINE_SOURCE_DIR}/public/iservernetworkable.h"
|
|
|
|
"${ENGINE_SOURCE_DIR}/public/iserverunknown.h"
|
|
|
|
)
|
|
|
|
|
|
|
|
endif()
|
|
|
|
|
2023-07-18 21:05:29 +02:00
|
|
|
if( ${PROJECT_NAME} STREQUAL "client_static" )
|
|
|
|
|
2023-05-10 00:05:38 +02:00
|
|
|
add_sources( SOURCE_GROUP "Client"
|
|
|
|
"client/c_baseentity.cpp"
|
|
|
|
"client/c_baseentity.h"
|
|
|
|
"client/c_baseplayer.h"
|
|
|
|
"client/cliententitylist.h"
|
|
|
|
"client/enginesprite.h"
|
|
|
|
"client/hud.h"
|
2023-06-13 17:43:32 +02:00
|
|
|
"client/input.cpp"
|
|
|
|
"client/input.h"
|
2023-05-10 00:05:38 +02:00
|
|
|
"client/movehelper_client.cpp"
|
|
|
|
"client/movehelper_client.h"
|
|
|
|
"client/spritemodel.cpp"
|
2023-07-19 02:27:28 +02:00
|
|
|
"client/util_client.cpp"
|
|
|
|
"client/util_client.h"
|
2023-05-10 00:05:38 +02:00
|
|
|
"client/viewrender.cpp"
|
|
|
|
"client/viewrender.h"
|
2023-07-18 21:05:29 +02:00
|
|
|
"client/vscript_client.cpp"
|
|
|
|
"client/vscript_client.h"
|
2023-05-10 00:05:38 +02:00
|
|
|
)
|
|
|
|
|
2023-05-15 14:47:03 +02:00
|
|
|
add_sources( SOURCE_GROUP "Public"
|
|
|
|
"${ENGINE_SOURCE_DIR}/public/icliententity.h"
|
|
|
|
"${ENGINE_SOURCE_DIR}/public/icliententitylist.h"
|
|
|
|
"${ENGINE_SOURCE_DIR}/public/iclientnetworkable.h"
|
|
|
|
"${ENGINE_SOURCE_DIR}/public/iclientrenderable.h"
|
|
|
|
"${ENGINE_SOURCE_DIR}/public/iclientthinkable.h"
|
|
|
|
"${ENGINE_SOURCE_DIR}/public/iclientunknown.h"
|
2023-06-13 17:43:32 +02:00
|
|
|
|
2023-07-18 00:17:49 +02:00
|
|
|
"${ENGINE_SOURCE_DIR}/public/game/client/iinput.h"
|
|
|
|
)
|
|
|
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
add_sources( SOURCE_GROUP "Public"
|
|
|
|
"${ENGINE_SOURCE_DIR}/public/basehandle.h"
|
|
|
|
"${ENGINE_SOURCE_DIR}/public/edict.h"
|
|
|
|
"${ENGINE_SOURCE_DIR}/public/eiface.h"
|
|
|
|
"${ENGINE_SOURCE_DIR}/public/globalvars_base.h"
|
|
|
|
"${ENGINE_SOURCE_DIR}/public/ihandleentity.h"
|
|
|
|
|
2023-06-13 17:43:32 +02:00
|
|
|
"${ENGINE_SOURCE_DIR}/public/game/shared/weapon_types.h"
|
|
|
|
"${ENGINE_SOURCE_DIR}/public/game/shared/in_buttons.h"
|
2023-05-15 14:47:03 +02:00
|
|
|
)
|
|
|
|
|
2023-05-10 00:05:38 +02:00
|
|
|
end_sources()
|
|
|
|
|
2023-07-18 00:17:49 +02:00
|
|
|
if( ${PROJECT_NAME} STREQUAL "server_static" )
|
2023-07-18 21:05:29 +02:00
|
|
|
|
2023-07-18 00:17:49 +02:00
|
|
|
target_compile_definitions( ${PROJECT_NAME} PRIVATE
|
|
|
|
"SERVER_DLL"
|
|
|
|
)
|
|
|
|
elseif( ${PROJECT_NAME} STREQUAL "client_static" )
|
|
|
|
target_compile_definitions( ${PROJECT_NAME} PRIVATE
|
|
|
|
"CLIENT_DLL"
|
|
|
|
)
|
2023-07-18 21:05:29 +02:00
|
|
|
|
2023-07-18 00:17:49 +02:00
|
|
|
endif()
|
|
|
|
|
2023-05-13 00:14:53 +02:00
|
|
|
target_include_directories( ${PROJECT_NAME} PRIVATE
|
|
|
|
"${ENGINE_SOURCE_DIR}/tier0/"
|
|
|
|
"${ENGINE_SOURCE_DIR}/tier1/"
|
|
|
|
)
|
2023-07-18 00:17:49 +02:00
|
|
|
|
|
|
|
endmacro()
|
|
|
|
|
|
|
|
add_game_project( "server_static" )
|
|
|
|
add_game_project( "client_static" )
|
2023-07-18 21:05:29 +02:00
|
|
|
add_game_project( "game_shared_static" )
|