aboutsummaryrefslogtreecommitdiff
path: root/ports/nethost/0001-nethost-cmakelists.patch
blob: 93d49b95e164398a7836ca05101922df516b82ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
diff --git a/src/installer/corehost/cli/common.cmake b/src/installer/corehost/cli/common.cmake
index 63e7306..639c90e 100644
--- a/src/installer/corehost/cli/common.cmake
+++ b/src/installer/corehost/cli/common.cmake
@@ -5,9 +5,6 @@
 project(${DOTNET_PROJECT_NAME})
 
 if(WIN32)
-    add_compile_options($<$<CONFIG:RelWithDebInfo>:/MT>)
-    add_compile_options($<$<CONFIG:Release>:/MT>)
-    add_compile_options($<$<CONFIG:Debug>:/MTd>)
 else()
     add_compile_options(-fvisibility=hidden)
 endif()
diff --git a/src/installer/corehost/cli/nethost/CMakeLists.txt b/src/installer/corehost/cli/nethost/CMakeLists.txt
index 7473958..49c664f 100644
--- a/src/installer/corehost/cli/nethost/CMakeLists.txt
+++ b/src/installer/corehost/cli/nethost/CMakeLists.txt
@@ -2,12 +2,14 @@
 # The .NET Foundation licenses this file to you under the MIT license.
 # See the LICENSE file in the project root for more information.
 
-cmake_minimum_required (VERSION 2.6)
+cmake_minimum_required (VERSION 3.14)
 project(nethost)
 
 set(DOTNET_PROJECT_NAME "nethost")
 
 # Include directories
+include(../../../settings.cmake)
+include(../../../functions.cmake)
 include_directories(../fxr)
 
 # CMake does not recommend using globbing since it messes with the freshness checks
@@ -22,13 +24,18 @@ if(WIN32)
         Exports.def)
 endif()
 
+if(BUILD_SHARED_LIBS)
 include(../lib.cmake)
+else()
 include(../lib_static.cmake)
+endif()
 
 add_definitions(-DFEATURE_LIBHOST=1)
 add_definitions(-DNETHOST_EXPORT)
 
-install(FILES nethost.h DESTINATION corehost)
-install(TARGETS nethost DESTINATION corehost)
-install(TARGETS libnethost DESTINATION corehost)
-install_symbols(nethost corehost)
\ No newline at end of file
+install(FILES nethost.h ../coreclr_delegates.h ../hostfxr.h DESTINATION include)
+if(BUILD_SHARED_LIBS)
+install(TARGETS nethost)
+else()
+install(TARGETS libnethost)
+endif()