diff --git a/CMakeLists.txt b/CMakeLists.txt index fee3cbe..0229f37 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -292,10 +292,18 @@ function(use_townengine target sources output_directory data_dir) string(JOIN "\n" TWN_BOOTSTRAP_SH "#!/bin/env sh" "cd \"$(dirname \"$0\")\"" - "export LD_LIBRARY_PATH=./" + "export LD_LIBRARY_PATH=\"\$LD_LIBRARY_PATH:./\"" "if [ \"\$1\" = \"gdb\" ]; then" " unset DEBUGINFOD_URLS" " gdb -ex run --args ./launcher ${TWN_BOOTSTRAP_EXEC_ARGS}" + "elif [ \"\$1\" = \"apitrace-take\" ]; then" + " export ASAN_OPTIONS=verify_asan_link_order=0" + " export LD_PRELOAD=\"/usr/lib/libubsan.so.1 /usr/lib/apitrace/wrappers/glxtrace.so \$LD_PRELOAD\"" + " ./launcher ${TWN_BOOTSTRAP_EXEC_ARGS}" + "elif [ \"\$1\" = \"apitrace-use\" ]; then" + " traces=( launcher.*.trace )" + " trace=\${traces[-1]}" + " qapitrace \${trace}" "else" " ./launcher ${TWN_BOOTSTRAP_EXEC_ARGS}" "fi"