I\'m currently porting a gcc project to Visual C++. It\'s defined in a CMake file, and I have created a Visual C++ property sheet to aid in compatibility (GccCompat.props). Ever
This functionality has made it into the nightly build of CMake (https://gitlab.kitware.com/cmake/cmake/commit/e390991846825799e619e072a28f1da58b7c89ba), although not into a stable release yet. Theoretically, it will be in the next release, and CMake releases are made relatively frequently.
To use, you would set the VS_USER_PROPS
property on a target. Eg. set_target_properties(foo PROPERTIES VS_USER_PROPS "${props_file}")
.
However, it doesn't appear that you can use multiple property sheets with this option, and, it replaces the default user property file ($(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props
). To workaround this, property sheets can include other property sheets, so, you could make a 'master' property sheet which includes any other property sheets that you would like to use (including the default user property sheet).