VS2017 Passing linker arguments via target_link_libraries()
Hi!
I have the following problem on Windows: I specify linker arguments via target_link_libraries() (because in this case I can use generator expressions) but replacing / with - (a dash), and these arguments are really passed to command line, but VS generator doesn't recognize some flags conflict with VS defaults, and therefore, when I pass -MANIFESTUAC:\"level='requireAdministrator' uiAccess='false'\"
flag, the linker also gets the default value for this flag from VS (which is /MANIFESTUAC:"level='asInvoker' uiAccess='false'"
), and so the build fails like this:
Error c1010001 Values of attribute "level" not equal in different manifest snippets.
Error LNK1327 failure during running mt.exe
Env: CMake version 3.7.2