From 2c2c4b96516e63d02a16fc7755d03e154406b469 Mon Sep 17 00:00:00 2001 From: veclavtalica Date: Sat, 21 Sep 2024 21:14:25 +0300 Subject: [PATCH] add gdb option in game launcher script --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6743ede..84d1091 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}