master
cmake 20 lines 770 Bytes
Raw
1 function(configure_csharp_target TARGET)
2 set(TARGET_PLATFORM_MIN_VERSION "10.0.19041.0")
3
4 target_compile_options(
5 ${TARGET}
6 PRIVATE
7 "/langversion:latest"
8 "/debug:full")
9
10 set_target_properties(
11 ${TARGET} PROPERTIES
12 VS_GLOBAL_TargetPlatformVersion "${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}"
13 VS_GLOBAL_TargetPlatformMinVersion "${TARGET_PLATFORM_MIN_VERSION}"
14 VS_GLOBAL_WindowsSdkPackageVersion "${WINDOWS_SDK_DOTNET_VERSION}"
15 VS_GLOBAL_AppendRuntimeIdentifierToOutputPath false
16 VS_GLOBAL_TargetLatestRuntimePatch false
17 DOTNET_SDK "Microsoft.NET.Sdk"
18 DOTNET_TARGET_FRAMEWORK "net8.0-windows${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}"
19 )
20 endfunction()