2016-08-08 09:27:59 +02:00
|
|
|
#
|
|
|
|
# Copyright (c) 2016 Alibek Omarov
|
|
|
|
#
|
|
|
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
# of this software and associated documentation files (the "Software"), to deal
|
|
|
|
# in the Software without restriction, including without limitation the rights
|
|
|
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
# copies of the Software, and to permit persons to whom the Software is
|
|
|
|
# furnished to do so, subject to the following conditions:
|
|
|
|
#
|
|
|
|
# The above copyright notice and this permission notice shall be included in all
|
|
|
|
# copies or substantial portions of the Software.
|
|
|
|
#
|
|
|
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
|
# SOFTWARE.
|
|
|
|
#
|
|
|
|
|
|
|
|
cmake_minimum_required(VERSION 2.6.0)
|
|
|
|
project (CLDLL)
|
|
|
|
|
|
|
|
set (CLDLL_LIBRARY client)
|
|
|
|
|
2018-02-22 23:47:45 +01:00
|
|
|
add_definitions(-DCLIENT_WEAPONS -DCLIENT_DLL -DCROWBAR_IDLE_ANIM)
|
2017-12-28 00:02:23 +01:00
|
|
|
|
2017-12-28 00:05:47 +01:00
|
|
|
if(NOT MSVC)
|
2017-12-28 00:02:23 +01:00
|
|
|
add_compile_options(-fno-exceptions) # GCC/Clang flag
|
|
|
|
add_compile_options(-Wno-write-strings) # GCC/Clang flag
|
2018-08-07 09:24:04 +02:00
|
|
|
add_compile_options(-fvisibility=hidden) # GCC/Clang flag
|
2017-12-28 00:02:23 +01:00
|
|
|
add_definitions(-D_LINUX -DLINUX) # It seems enough for all non-Win32 systems
|
2018-04-03 20:39:07 +02:00
|
|
|
add_definitions(-Dstricmp=strcasecmp -Dstrnicmp=strncasecmp)
|
|
|
|
if(NOT MINGW)
|
|
|
|
add_definitions(-D_snprintf=snprintf -D_vsnprintf=vsnprintf)
|
|
|
|
endif()
|
2017-12-28 00:02:23 +01:00
|
|
|
else()
|
|
|
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE)
|
|
|
|
endif()
|
|
|
|
|
2016-11-17 23:05:05 +01:00
|
|
|
if (GOLDSOURCE_SUPPORT)
|
2017-12-28 00:02:23 +01:00
|
|
|
add_definitions(-DGOLDSOURCE_SUPPORT)
|
2016-11-17 23:05:05 +01:00
|
|
|
endif()
|
2017-12-28 00:02:23 +01:00
|
|
|
|
2016-08-08 09:27:59 +02:00
|
|
|
|
2016-11-17 23:05:05 +01:00
|
|
|
set (CLDLL_SOURCES
|
2016-10-02 01:08:38 +02:00
|
|
|
../dlls/visitors/pipe.cpp
|
|
|
|
../dlls/visitors/sniper.cpp
|
2016-08-08 09:27:59 +02:00
|
|
|
../dlls/crossbow.cpp
|
|
|
|
../dlls/crowbar.cpp
|
2016-12-17 12:37:22 +01:00
|
|
|
# ../dlls/egon.cpp
|
|
|
|
# ../dlls/gauss.cpp
|
2016-08-08 09:27:59 +02:00
|
|
|
../dlls/handgrenade.cpp
|
|
|
|
../dlls/hornetgun.cpp
|
|
|
|
../dlls/mp5.cpp
|
|
|
|
../dlls/python.cpp
|
|
|
|
../dlls/rpg.cpp
|
|
|
|
../dlls/satchel.cpp
|
|
|
|
../dlls/shotgun.cpp
|
|
|
|
../dlls/squeakgrenade.cpp
|
|
|
|
../dlls/tripmine.cpp
|
|
|
|
../dlls/glock.cpp
|
2016-11-17 23:05:05 +01:00
|
|
|
ev_hldm.cpp
|
2016-08-08 09:27:59 +02:00
|
|
|
hl/hl_baseentity.cpp
|
|
|
|
hl/hl_events.cpp
|
|
|
|
hl/hl_objects.cpp
|
|
|
|
hl/hl_weapons.cpp
|
|
|
|
ammo.cpp
|
|
|
|
ammo_secondary.cpp
|
|
|
|
ammohistory.cpp
|
|
|
|
battery.cpp
|
|
|
|
cdll_int.cpp
|
|
|
|
com_weapons.cpp
|
|
|
|
death.cpp
|
|
|
|
demo.cpp
|
|
|
|
entity.cpp
|
|
|
|
ev_common.cpp
|
|
|
|
events.cpp
|
|
|
|
flashlight.cpp
|
|
|
|
GameStudioModelRenderer.cpp
|
|
|
|
geiger.cpp
|
|
|
|
health.cpp
|
|
|
|
hud.cpp
|
|
|
|
hud_msg.cpp
|
|
|
|
hud_redraw.cpp
|
|
|
|
hud_spectator.cpp
|
|
|
|
hud_update.cpp
|
|
|
|
in_camera.cpp
|
|
|
|
input.cpp
|
2017-12-03 21:52:35 +01:00
|
|
|
input_goldsource.cpp
|
|
|
|
input_mouse.cpp
|
|
|
|
input_xash3d.cpp
|
2016-08-08 09:27:59 +02:00
|
|
|
menu.cpp
|
|
|
|
message.cpp
|
|
|
|
overview.cpp
|
|
|
|
parsemsg.cpp
|
|
|
|
../pm_shared/pm_debug.c
|
|
|
|
../pm_shared/pm_math.c
|
|
|
|
../pm_shared/pm_shared.c
|
|
|
|
saytext.cpp
|
|
|
|
status_icons.cpp
|
|
|
|
statusbar.cpp
|
|
|
|
studio_util.cpp
|
|
|
|
StudioModelRenderer.cpp
|
|
|
|
text_message.cpp
|
|
|
|
train.cpp
|
|
|
|
tri.cpp
|
|
|
|
util.cpp
|
|
|
|
view.cpp
|
|
|
|
scoreboard.cpp
|
|
|
|
MOTD.cpp)
|
2016-11-17 23:05:05 +01:00
|
|
|
|
2018-01-24 18:51:14 +01:00
|
|
|
include_directories (. hl/ ../dlls ../dlls/wpn_shared ../common ../engine ../pm_shared ../game_shared ../public ../utils/false_vgui/include ../dlls/visitors )
|
2016-08-08 09:27:59 +02:00
|
|
|
|
|
|
|
if(USE_VOICEMGR)
|
|
|
|
#set(CLDLL_SOURCES
|
|
|
|
# ${CLDLL_SOURCES}
|
|
|
|
# ../game_shared/voice_banmgr.cpp
|
|
|
|
# ../game_shared/voice_status.cpp)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
add_library (${CLDLL_LIBRARY} SHARED ${CLDLL_SOURCES})
|
2017-12-17 22:44:42 +01:00
|
|
|
if (GOLDSOURCE_SUPPORT)
|
|
|
|
target_link_libraries( ${CLDLL_LIBRARY} ${CMAKE_DL_LIBS} )
|
|
|
|
endif()
|
2016-08-08 09:27:59 +02:00
|
|
|
|
2017-12-18 22:27:56 +01:00
|
|
|
set_target_properties (${CLDLL_LIBRARY} PROPERTIES
|
2016-08-08 09:27:59 +02:00
|
|
|
POSITION_INDEPENDENT_CODE 1)
|
|
|
|
|
2017-12-18 22:27:56 +01:00
|
|
|
if(APPLE OR WIN32 OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
2018-03-22 13:23:34 +01:00
|
|
|
set(CLDLL_NAME "client")
|
|
|
|
if(64BIT)
|
|
|
|
set(CLDLL_NAME "client64")
|
|
|
|
endif()
|
|
|
|
|
2017-12-18 22:27:56 +01:00
|
|
|
set_target_properties(${CLDLL_LIBRARY} PROPERTIES
|
2018-03-22 13:23:34 +01:00
|
|
|
OUTPUT_NAME ${CLDLL_NAME}
|
2017-12-18 22:27:56 +01:00
|
|
|
PREFIX "")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
install( TARGETS ${CLDLL_LIBRARY}
|
|
|
|
DESTINATION "${GAMEDIR}/${CLIENT_INSTALL_DIR}/"
|
|
|
|
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
|
|
|
|
GROUP_READ GROUP_EXECUTE
|
|
|
|
WORLD_READ WORLD_EXECUTE )
|