Skip to content

Commit e3407d6

Browse files
ayeteadoetrflynn89
authored andcommitted
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.
1 parent 7d96fba commit e3407d6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Meta/CMake/targets.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,14 @@ function(lagom_subsystem_windows target_name)
4242
endfunction()
4343

4444
function(lagom_windows_bin target_name)
45-
cmake_parse_arguments(PARSE_ARGV 2 LAGOM_WINDOWS_BIN "CONSOLE" "" "")
45+
cmake_parse_arguments(LAGOM_WINDOWS_BIN "CONSOLE" "" "" ${ARGN})
4646
lagom_copy_runtime_dlls(${target_name})
4747
if (NOT LAGOM_WINDOWS_BIN_CONSOLE)
4848
lagom_subsystem_windows(${target_name})
49+
else()
50+
set_target_properties(${target_name} PROPERTIES
51+
WIN32_EXECUTABLE FALSE
52+
)
4953
endif()
5054
endfunction()
5155

0 commit comments

Comments
 (0)