From ef4f613ba0ce350c0b1c3ce236536e2a9e5afecc Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 24 May 2017 17:22:59 +0200 Subject: cmake: avoid rebuilds wrt win32 subsystem --- cmake/opentrack-boilerplate.cmake | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'cmake') 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 "$") - get_property(type TARGET "${n}" PROPERTY TYPE) if (NOT type STREQUAL "STATIC_LIBRARY") add_custom_command(TARGET "${n}" POST_BUILD -- cgit v1.2.3