2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-12-20 07:49:47 +01:00
xash3d-fwgs/game_launch/wscript

40 lines
1.0 KiB
Plaintext
Raw Normal View History

#! /usr/bin/env python
# encoding: utf-8
# a1batross, mittorn, 2018
from waflib import Logs
import os
import sys
top = '.'
def options(opt):
grp = opt.add_option_group('Game launcher options')
grp.add_option('--disable-menu-changegame', action = 'store_true', dest = 'DISABLE_MENU_CHANGEGAME', default = False,
help = 'disable changing the game from the menu [default: %(default)s]')
def configure(conf):
if conf.env.DEST_OS == 'win32':
conf.load('winres')
conf.define_cond('XASH_DISABLE_MENU_CHANGEGAME', conf.options.DISABLE_MENU_CHANGEGAME)
def build(bld):
source = ['game.cpp']
if bld.env.DEST_OS == 'win32':
2018-06-14 19:34:51 +02:00
source += ['game.rc']
# Half-Life 25th anniversary update doesn't have server library explicitly linked to libm
if bld.env.DEST_OS == 'linux':
bld.env.LDFLAGS += ['-Wl,--no-as-needed', '-lm']
2024-10-23 22:20:47 +02:00
bld.program(source = source,
target = 'xash3d', # hl.exe
2024-01-30 13:04:57 +01:00
use = 'sdk_includes DL USER32 SHELL32 werror',
rpath = bld.env.DEFAULT_RPATH,
install_path = bld.env.BINDIR,
subsystem = bld.env.MSVC_SUBSYSTEM
)