Option add definitions to "Global" section to all targets in VisualStudio
I have toolchain file for "yet another" proprietary platform...
And some properties (for example SDK_Version) related to toolchain itself should be stored in "Global" section in .vcxproj for all targets.
Right now I workaround it via macro in toolchain file like
toolchain.cmake
...
macro(set_xxx_properties target)
set_target_properties(${target} PROPERTIES VS_GLOBAL_MysteriousSdkVer "1")
# another bunch of properties
endmacro()
CMakeLists.txt
...
add_executable(Tgt ...)
set_xxx_properties(Tgt)
But it's a bit annoying to call it for each target I have. Better way in my opinion will be to have VS_SHARED_GLOBAL_*
set of variables (can do patch).
Any thoughts?