add gdb option in game launcher script

This commit is contained in:
veclav talica 2024-09-21 21:14:25 +03:00
parent 5caf736370
commit 2c2c4b9651

View File

@ -292,7 +292,13 @@ function(use_townengine target sources output_directory data_dir)
string(JOIN "\n" TWN_BOOTSTRAP_SH
"#!/bin/env sh"
"cd \"$(dirname \"$0\")\""
"LD_LIBRARY_PATH=./ ./launcher ${TWN_BOOTSTRAP_EXEC_ARGS}"
"export LD_LIBRARY_PATH=./"
"if [ \$1 = \"web\" ]; then"
" unset DEBUGINFOD_URLS"
" gdb -ex run --args ./launcher ${TWN_BOOTSTRAP_EXEC_ARGS}"
"else"
" ./launcher ${TWN_BOOTSTRAP_EXEC_ARGS}"
"fi"
"")
FILE(GENERATE OUTPUT ${output_directory}/${target}