summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/VS10Project/VsDotnetTargetFramework.cmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2020-01-13 16:33:55 (GMT)
committerBrad King <brad.king@kitware.com>2020-01-24 14:11:05 (GMT)
commitae1e1909a13fa6e68c33fe92cc8f5c76c30df76f (patch)
tree20f52a77199a163a7e8f4fd6a786ba1b77ac22f9 /Tests/RunCMake/VS10Project/VsDotnetTargetFramework.cmake
parent93d414861251cb6c88021756f53621160b98bf96 (diff)
downloadCMake-ae1e1909a13fa6e68c33fe92cc8f5c76c30df76f.zip
CMake-ae1e1909a13fa6e68c33fe92cc8f5c76c30df76f.tar.gz
CMake-ae1e1909a13fa6e68c33fe92cc8f5c76c30df76f.tar.bz2
VS: Add support for .NET Standard and .NET Core
Fixes: #20105
Diffstat (limited to 'Tests/RunCMake/VS10Project/VsDotnetTargetFramework.cmake')
-rw-r--r--Tests/RunCMake/VS10Project/VsDotnetTargetFramework.cmake11
1 files changed, 11 insertions, 0 deletions
diff --git a/Tests/RunCMake/VS10Project/VsDotnetTargetFramework.cmake b/Tests/RunCMake/VS10Project/VsDotnetTargetFramework.cmake
new file mode 100644
index 0000000..f553679
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/VsDotnetTargetFramework.cmake
@@ -0,0 +1,11 @@
+enable_language(CSharp)
+if(NOT CMAKE_CSharp_COMPILER)
+ return()
+endif()
+
+set(CMAKE_DOTNET_TARGET_FRAMEWORK "netcoreapp3.1")
+set(CMAKE_DOTNET_TARGET_FRAMEWORK_VERSION "net461")
+add_library(foo SHARED foo.cs)
+
+set(CMAKE_DOTNET_TARGET_FRAMEWORK "netcoreapp3.1;net461")
+add_library(bar SHARED foo.cs)