Enhance debugging capabilities and update build configuration

- Introduced a new debug logging mechanism by defining `dbg_log` for conditional logging based on the `DEBUG_BUILD` option.
- Updated `build.ps1` to include a debug flag for CMake configuration.
- Refactored logging calls across multiple source files to utilize the new `dbg_log` function, improving consistency and clarity in debug output.
- Added a new header file `debug-log.h` to centralize debug logging definitions.
This commit is contained in:
Nils
2026-05-04 16:30:04 +02:00
parent 6d16baf052
commit ebc9013c6e
13 changed files with 210 additions and 259 deletions
+4 -1
View File
@@ -90,6 +90,8 @@ if (-not (Test-Path "$OBS_LIBS\obs.lib") -or (Get-Item "$OBS_LIBS\obs.lib").Leng
# --- 5. Build ---
Write-Host "[5/5] Building..."
$debugFlag = if ($env:DEBUG_BUILD -eq "1") { "-DDEBUG_BUILD=ON" } else { "-DDEBUG_BUILD=OFF" }
cmake -S $ROOT -B $BUILD_DIR -G "Ninja" `
-DCMAKE_BUILD_TYPE=RelWithDebInfo `
-DCMAKE_C_COMPILER=cl `
@@ -97,7 +99,8 @@ cmake -S $ROOT -B $BUILD_DIR -G "Ninja" `
-DOBS_SOURCE_DIR="$OBS_SRC" `
-DOBS_LIB_DIR="$OBS_LIBS" `
-DFFMPEG_DIR="$OBS_DEPS" `
-DQT6_DIR="$QT6_DIR"
-DQT6_DIR="$QT6_DIR" `
$debugFlag
cmake --build $BUILD_DIR --config RelWithDebInfo