diff --git a/src/Directory.Build.props b/src/Directory.Build.props index c22e11faca..b423b589a9 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -6,6 +6,9 @@ .so .dll .dylib + lib + .a + .lib diff --git a/src/corehost/cli/lib_static.cmake b/src/corehost/cli/lib_static.cmake new file mode 100644 index 0000000000..6c4b5036cf --- /dev/null +++ b/src/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/corehost/cli/nethost/CMakeLists.txt b/src/corehost/cli/nethost/CMakeLists.txt index b56650bfac..7473958e26 100644 --- a/src/corehost/cli/nethost/CMakeLists.txt +++ b/src/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/pkg/packaging/installers.proj b/src/pkg/packaging/installers.proj index e2a60d4ec7..d9448e3afc 100644 --- a/src/pkg/packaging/installers.proj +++ b/src/pkg/packaging/installers.proj @@ -121,6 +121,7 @@ + + diff --git a/src/pkg/projects/Microsoft.NETCore.DotNetAppHost/runtime.OSX.Microsoft.NETCore.DotNetAppHost.props b/src/pkg/projects/Microsoft.NETCore.DotNetAppHost/runtime.OSX.Microsoft.NETCore.DotNetAppHost.props index ebf6fb947c..cc38b3b848 100644 --- a/src/pkg/projects/Microsoft.NETCore.DotNetAppHost/runtime.OSX.Microsoft.NETCore.DotNetAppHost.props +++ b/src/pkg/projects/Microsoft.NETCore.DotNetAppHost/runtime.OSX.Microsoft.NETCore.DotNetAppHost.props @@ -3,6 +3,7 @@ + diff --git a/src/pkg/projects/Microsoft.NETCore.DotNetAppHost/runtime.Unix.Microsoft.NETCore.DotNetAppHost.props b/src/pkg/projects/Microsoft.NETCore.DotNetAppHost/runtime.Unix.Microsoft.NETCore.DotNetAppHost.props index fe8c133798..a6051c2df1 100644 --- a/src/pkg/projects/Microsoft.NETCore.DotNetAppHost/runtime.Unix.Microsoft.NETCore.DotNetAppHost.props +++ b/src/pkg/projects/Microsoft.NETCore.DotNetAppHost/runtime.Unix.Microsoft.NETCore.DotNetAppHost.props @@ -3,6 +3,7 @@ + diff --git a/src/pkg/projects/Microsoft.NETCore.DotNetAppHost/runtime.Windows_NT.Microsoft.NETCore.DotNetAppHost.props b/src/pkg/projects/Microsoft.NETCore.DotNetAppHost/runtime.Windows_NT.Microsoft.NETCore.DotNetAppHost.props index 9cc0b41e63..c74da91a0f 100644 --- a/src/pkg/projects/Microsoft.NETCore.DotNetAppHost/runtime.Windows_NT.Microsoft.NETCore.DotNetAppHost.props +++ b/src/pkg/projects/Microsoft.NETCore.DotNetAppHost/runtime.Windows_NT.Microsoft.NETCore.DotNetAppHost.props @@ -6,6 +6,7 @@ +