fixed vcpkg trying to set properties on INTERFACE and ALIAS targets

This commit is contained in:
Charlie Barto 2016-12-02 12:24:14 -05:00
parent 25b6ef7a9d
commit f874d15eca

View File

@ -83,7 +83,9 @@ if(NOT VCPKG_TOOLCHAIN)
function(add_library name)
_add_library(${ARGV})
list(FIND ARGV "IMPORTED" IMPORTED_IDX)
if(IMPORTED_IDX EQUAL -1)
list(FIND ARGV "INTERFACE" INTERFACE_IDX)
list(FIND ARGV "ALIAS" ALIAS_IDX)
if(IMPORTED_IDX EQUAL -1 AND INTERFACE_IDX EQUAL -1 AND ALIAS_IDX EQUAL -1)
set_target_properties(${name} PROPERTIES VS_GLOBAL_VcpkgEnabled false)
endif()
endfunction()