From 0e1b00e9a78ee65c4b5eeaaa74a2be4a3ccd0ac7 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 23 Aug 2016 13:21:48 +0200 Subject: cmake: don't try to editbin static libraries. avoid warning. --- cmake/opentrack-boilerplate.cmake | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'cmake/opentrack-boilerplate.cmake') diff --git a/cmake/opentrack-boilerplate.cmake b/cmake/opentrack-boilerplate.cmake index 5cabe949..4635a6bd 100644 --- a/cmake/opentrack-boilerplate.cmake +++ b/cmake/opentrack-boilerplate.cmake @@ -67,10 +67,13 @@ function(opentrack_fixup_subsystem n) message(FATAL_ERROR "no vcvars.bat run; probably no editbin in PATH") endif() set(loc "$") - add_custom_command(TARGET "${n}" - POST_BUILD - COMMAND editbin -nologo -SUBSYSTEM:${subsystem},5.01 -OSVERSION:5.1 \"${loc}\" - COMMENT "Fixing up Windows XP support for target ${n}") + get_property(type TARGET "${n}" PROPERTY TYPE) + if (NOT type STREQUAL "STATIC_LIBRARY") + add_custom_command(TARGET "${n}" + POST_BUILD + COMMAND editbin -nologo -SUBSYSTEM:${subsystem},5.01 -OSVERSION:5.1 \"${loc}\" + COMMENT "Fixing up Windows XP support for target ${n}") + endif() endif() endfunction() @@ -138,6 +141,8 @@ function(opentrack_boilerplate n) opentrack_is_target_c_only(is-c-only "${${n}-all}") if(NOT is-c-only) opentrack_qt(${n}) + else() + set(arg_NO-QT TRUE) endif() if(arg_NO-QT) -- cgit v1.2.3