For regular projects we set this through user files, so it works for the generated projects. (it worked with cmake 3.7.0)
Now in the new cmake version when I generate a project with VS 14 generator selected it fails, because I have enabled the languages C/C++.
The problem is, that cmake does try to build a project to determine the toolset (calling FindVCTargetsPath). This does generate a project VCTargetsPath.vcxproj which is not compile-able for the custom platform since the properties required for that platform are not defined and there is no way how to set them.
Please what can I do here to disable the toolset check or get around it?
On 04/11/2018 09:24 AM, Ales Borovicka wrote:
> We have a custom platform that does require to set properties in vcxproj like:
> <PlatformSdkRoot>$(PLATFORM_SDK_ROOT)</ PlatformSdkRoot >
> For regular projects we set this through user files, so it works for the
> generated projects. (it worked with cmake 3.7.0)
We don't currently support that officially. CMake generates temporary
project files in several places, e.g. try_compile, that would not get
user-set properties from the project code.
In order to support a custom platform SDK CMake would need to be
taught a corresponding abstraction. The VS generators already support
* CMAKE_GENERATOR_TOOLSET = v141 or some other toolset
* CMAKE_GENERATOR_PLATFORM = Win32, x64, etc.
* CMAKE_GENERATOR_INSTANCE = Which VS 2017 to use on local machine
All of these affect the way .vcxproj files are generated. If a
.vcxproj file needs an additional field for MSBuild to be able
to find the SDK then a similar abstraction will be needed.
I'd need to understand the use case better before recommending an
approach to such an abstraction.