|
|
|
#
|
|
|
|
# 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)
|
|
|
|
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-write-strings -DLINUX -D_LINUX -Dstricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -DCLIENT_DLL -w")
|
|
|
|
if (GOLDSOURCE_SUPPORT)
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DGOLDSOURCE_SUPPORT")
|
|
|
|
endif()
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}")
|
|
|
|
|
|
|
|
set (CLDLL_SOURCES
|
|
|
|
../dlls/hunger/ap9.cpp
|
|
|
|
../dlls/hunger/chaingun.cpp
|
|
|
|
../dlls/hunger/sniper.cpp
|
|
|
|
../dlls/hunger/taurus.cpp
|
|
|
|
../dlls/hunger/tfcsniper.cpp
|
|
|
|
../dlls/glock.cpp
|
|
|
|
ev_hldm.cpp
|
|
|
|
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
|
|
|
|
input_goldsource.cpp
|
|
|
|
input_mouse.cpp
|
|
|
|
input_xash3d.cpp
|
|
|
|
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)
|
|
|
|
|
|
|
|
include_directories (. hl/ ../dlls ../dlls/hunger ../dlls/wpn_shared ../common ../engine ../pm_shared ../game_shared ../public ../utils/false_vgui/include )
|
|
|
|
|
|
|
|
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})
|
|
|
|
if (GOLDSOURCE_SUPPORT)
|
|
|
|
target_link_libraries( ${CLDLL_LIBRARY} ${CMAKE_DL_LIBS} )
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set_target_properties (${CLDLL_LIBRARY} PROPERTIES
|
|
|
|
POSITION_INDEPENDENT_CODE 1)
|
|
|
|
|
|
|
|
if(APPLE OR WIN32 OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
|
|
|
set_target_properties(${CLDLL_LIBRARY} PROPERTIES
|
|
|
|
OUTPUT_NAME "client"
|
|
|
|
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 )
|