From 67f62daa9f4ba5cd8cf604ecbf59b6d7451a4684 Mon Sep 17 00:00:00 2001 From: Dominic Masters Date: Sat, 15 Nov 2025 22:27:09 -0600 Subject: [PATCH] Cmake fix --- cmake/modules/envtoh.cmake | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cmake/modules/envtoh.cmake b/cmake/modules/envtoh.cmake index bad6c2d..822e73b 100644 --- a/cmake/modules/envtoh.cmake +++ b/cmake/modules/envtoh.cmake @@ -15,9 +15,11 @@ file(STRINGS "${ENV_FILE}" ENV_LINES) set(HEADER_CONTENT "#pragma once\n#include \"dusk.h\"\n\n") foreach(line IN LISTS ENV_LINES) - # Trim whitespace - string(REGEX REPLACE "^[ \t]*" "" line "${line}") - string(REGEX REPLACE "[ \t]*$" "" line "${line}") + # Only trim whitespace if line is not empty + if(NOT line STREQUAL "") + string(REGEX REPLACE "^[ \t]*" "" line "${line}") + string(REGEX REPLACE "[ \t]*$" "" line "${line}") + endif() # Skip comments and empty lines (allow whitespace before # or ;) if(line STREQUAL "" OR line MATCHES "^[ \t]*[#;]")