diff options
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/opentrack-boilerplate.cmake | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/cmake/opentrack-boilerplate.cmake b/cmake/opentrack-boilerplate.cmake index ec1946f0..7052e704 100644 --- a/cmake/opentrack-boilerplate.cmake +++ b/cmake/opentrack-boilerplate.cmake @@ -58,13 +58,12 @@ endfunction() function(otr_fixup_subsystem n) if(MSVC) - if(SDK_CONSOLE_DEBUG) + set(subsystem WINDOWS) + get_property(type TARGET "${n}" PROPERTY TYPE) + if(SDK_CONSOLE_DEBUG AND ".${type}" STREQUAL ".EXECUTABLE") set(subsystem CONSOLE) - else() - set(subsystem WINDOWS) endif() set(loc "$<TARGET_FILE:${n}>") - get_property(type TARGET "${n}" PROPERTY TYPE) if (NOT type STREQUAL "STATIC_LIBRARY") add_custom_command(TARGET "${n}" POST_BUILD |