summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-05-24 17:22:59 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-05-24 17:22:59 +0200
commitef4f613ba0ce350c0b1c3ce236536e2a9e5afecc (patch)
tree52bbf9e1adfea1b5f85682b4c188160ae82a8a7f
parent5952fe02902f3ef53a71bf7e08b24535a3003612 (diff)
cmake: avoid rebuilds wrt win32 subsystem
-rw-r--r--cmake/opentrack-boilerplate.cmake7
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