diff --git a/src/installer/Directory.Build.props b/src/installer/Directory.Build.props index c26b17925b29ae..7f548f1b5264e3 100644 --- a/src/installer/Directory.Build.props +++ b/src/installer/Directory.Build.props @@ -377,6 +377,9 @@ .so .dll .dylib + lib + .a + .lib diff --git a/src/installer/corehost/cli/lib_static.cmake b/src/installer/corehost/cli/lib_static.cmake new file mode 100644 index 00000000000000..6c4b5036cf9a6b --- /dev/null +++ b/src/installer/corehost/cli/lib_static.cmake @@ -0,0 +1,18 @@ +# Licensed to the .NET Foundation under one or more agreements. +# The .NET Foundation licenses this file to you under the MIT license. +# See the LICENSE file in the project root for more information. + +project(lib${DOTNET_PROJECT_NAME}) + +include(${CMAKE_CURRENT_LIST_DIR}/common.cmake) + +add_definitions(-D_NO_ASYNCRTIMP) +add_definitions(-D_NO_PPLXIMP) +add_definitions(-DEXPORT_SHARED_API=1) + +add_library(lib${DOTNET_PROJECT_NAME} STATIC ${SOURCES} ${RESOURCES}) + +set_target_properties(lib${DOTNET_PROJECT_NAME} PROPERTIES MACOSX_RPATH TRUE) +set_target_properties(lib${DOTNET_PROJECT_NAME} PROPERTIES PREFIX "") + +set_common_libs("lib") diff --git a/src/installer/corehost/cli/nethost/CMakeLists.txt b/src/installer/corehost/cli/nethost/CMakeLists.txt index b56650bfac494c..7473958e260035 100644 --- a/src/installer/corehost/cli/nethost/CMakeLists.txt +++ b/src/installer/corehost/cli/nethost/CMakeLists.txt @@ -23,10 +23,12 @@ if(WIN32) endif() include(../lib.cmake) +include(../lib_static.cmake) 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 diff --git a/src/installer/pkg/packaging/installers.proj b/src/installer/pkg/packaging/installers.proj index 56a8259a084f44..21736cb1953e51 100644 --- a/src/installer/pkg/packaging/installers.proj +++ b/src/installer/pkg/packaging/installers.proj @@ -121,6 +121,7 @@ + + diff --git a/src/installer/pkg/projects/Microsoft.NETCore.DotNetAppHost/runtime.OSX.Microsoft.NETCore.DotNetAppHost.props b/src/installer/pkg/projects/Microsoft.NETCore.DotNetAppHost/runtime.OSX.Microsoft.NETCore.DotNetAppHost.props index ebf6fb947c3d4b..cc38b3b8485242 100644 --- a/src/installer/pkg/projects/Microsoft.NETCore.DotNetAppHost/runtime.OSX.Microsoft.NETCore.DotNetAppHost.props +++ b/src/installer/pkg/projects/Microsoft.NETCore.DotNetAppHost/runtime.OSX.Microsoft.NETCore.DotNetAppHost.props @@ -3,6 +3,7 @@ + diff --git a/src/installer/pkg/projects/Microsoft.NETCore.DotNetAppHost/runtime.Unix.Microsoft.NETCore.DotNetAppHost.props b/src/installer/pkg/projects/Microsoft.NETCore.DotNetAppHost/runtime.Unix.Microsoft.NETCore.DotNetAppHost.props index fe8c133798c3f0..a6051c2df14fc7 100644 --- a/src/installer/pkg/projects/Microsoft.NETCore.DotNetAppHost/runtime.Unix.Microsoft.NETCore.DotNetAppHost.props +++ b/src/installer/pkg/projects/Microsoft.NETCore.DotNetAppHost/runtime.Unix.Microsoft.NETCore.DotNetAppHost.props @@ -3,6 +3,7 @@ + diff --git a/src/installer/pkg/projects/Microsoft.NETCore.DotNetAppHost/runtime.Windows_NT.Microsoft.NETCore.DotNetAppHost.props b/src/installer/pkg/projects/Microsoft.NETCore.DotNetAppHost/runtime.Windows_NT.Microsoft.NETCore.DotNetAppHost.props index 9cc0b41e634674..c74da91a0f25ca 100644 --- a/src/installer/pkg/projects/Microsoft.NETCore.DotNetAppHost/runtime.Windows_NT.Microsoft.NETCore.DotNetAppHost.props +++ b/src/installer/pkg/projects/Microsoft.NETCore.DotNetAppHost/runtime.Windows_NT.Microsoft.NETCore.DotNetAppHost.props @@ -6,6 +6,7 @@ +