CMake: Parse CONSOLE argument correctly in lagom_windows_bin()

The previous cmake_parse_arguments invocation was not parsing CONSOLE
arguments, which meant all executable targets that setup with
lagom_windows_bin were set to /SUBSYSTEM:WINDOWS even if we explicitly
wanted them to use the default /SUBSYSTEM:CONSOLE.
This commit is contained in:
ayeteadoe 2025-11-01 00:02:05 -07:00 committed by Tim Flynn
parent 7d96fbaf7a
commit e3407d68d4
Notes: github-actions[bot] 2025-11-03 18:24:53 +00:00

View file

@ -42,10 +42,14 @@ function(lagom_subsystem_windows target_name)
endfunction()
function(lagom_windows_bin target_name)
cmake_parse_arguments(PARSE_ARGV 2 LAGOM_WINDOWS_BIN "CONSOLE" "" "")
cmake_parse_arguments(LAGOM_WINDOWS_BIN "CONSOLE" "" "" ${ARGN})
lagom_copy_runtime_dlls(${target_name})
if (NOT LAGOM_WINDOWS_BIN_CONSOLE)
lagom_subsystem_windows(${target_name})
else()
set_target_properties(${target_name} PROPERTIES
WIN32_EXECUTABLE FALSE
)
endif()
endfunction()