Skip to content

Commit

Permalink
Fix string whitespace issue in CMake
Browse files Browse the repository at this point in the history
  • Loading branch information
maxwellmattryan committed Nov 18, 2024
1 parent c24fb5a commit 64001c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cmake/load_env.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ function(load_env_file env_file)
string(REGEX REPLACE "\n" ";" ENV_LINES "${ENV_CONTENT}")
foreach (line ${ENV_LINES})
string(STRIP "${line}" line)
separate_arguments(line UNIX_COMMAND ${line}) # Removes quotes from vars
string(REGEX MATCH "^[A-Za-z_][A-Za-z0-9_]*=.*" is_valid "${line}")
if (is_valid)
string(REPLACE "=" ";" kv_pair "${line}")
list(GET kv_pair 0 key)
list(GET kv_pair 1 value)
string(STRIP "${key}" key)
string(STRIP "${value}" value)
set("${key}" "${value}" PARENT_SCOPE)
set("${key}" ${value} PARENT_SCOPE)
endif ()
endforeach ()
else ()
Expand Down
2 changes: 1 addition & 1 deletion plugin.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
COMPANY_NAME=Black" "Box" "Audio
COMPANY_NAME="Black Box Audio"
COMPANY_WEBSITE=https://bbx-audio.com
PLUGIN_NAME=Rotor
PLUGIN_CODE=Rotr
Expand Down

0 comments on commit 64001c0

Please sign in to comment.