mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-06-07 01:24:47 +08:00
[nethost] Update to 7.0.0 (#27717)
* [nethost] Update to 7.0.0 * [nethost] Update versions * [nethost] Revision changes - 0001-nethost-cmakelists.patch: Remove the shell file patch and keep only the cmake patch - portfile.cmake: Bring the execute_process entry as a single block and only if not Windows - vcpkg.json: Extend the supports string to linux and osx * [nethost] Update versions
This commit is contained in:
parent
4e30bb39dd
commit
2d32d7c656
@ -1,73 +1,82 @@
|
||||
diff --git a/src/native/corehost/nethost/CMakeLists.txt b/src/native/corehost/nethost/CMakeLists.txt
|
||||
index a9f44e720..0f24d4458 100644
|
||||
--- a/src/native/corehost/nethost/CMakeLists.txt
|
||||
+++ b/src/native/corehost/nethost/CMakeLists.txt
|
||||
@@ -1,11 +1,14 @@
|
||||
# Licensed to the .NET Foundation under one or more agreements.
|
||||
# The .NET Foundation licenses this file to you under the MIT license.
|
||||
|
||||
+cmake_minimum_required (VERSION 3.14.5)
|
||||
project(nethost)
|
||||
|
||||
set(DOTNET_PROJECT_NAME "nethost")
|
||||
|
||||
# Include directories
|
||||
+include(../../../../eng/native/configurepaths.cmake)
|
||||
+include("${CLR_ENG_NATIVE_DIR}/configurecompiler.cmake")
|
||||
include_directories(../fxr)
|
||||
|
||||
# CMake does not recommend using globbing since it messes with the freshness checks
|
||||
@@ -19,12 +22,23 @@ if(CLR_CMAKE_TARGET_WIN32)
|
||||
Exports.def)
|
||||
endif()
|
||||
|
||||
+if(BUILD_SHARED_LIBS)
|
||||
include(../lib.cmake)
|
||||
+set(targets nethost)
|
||||
+else()
|
||||
+include(../hostmisc/hostmisc.cmake)
|
||||
include(../lib_static.cmake)
|
||||
+add_library(nethost INTERFACE)
|
||||
+target_link_libraries(nethost INTERFACE libnethost)
|
||||
+set(targets libnethost nethost)
|
||||
+target_include_directories(libnethost INTERFACE $<INSTALL_INTERFACE:include>)
|
||||
+endif()
|
||||
+target_include_directories(nethost INTERFACE $<INSTALL_INTERFACE:include>)
|
||||
|
||||
add_definitions(-DFEATURE_LIBHOST=1)
|
||||
add_definitions(-DNETHOST_EXPORT)
|
||||
|
||||
+if(NOT BUILD_SHARED_LIBS)
|
||||
# Copy static lib PDB to the project output directory
|
||||
if (WIN32)
|
||||
set_target_properties(libnethost PROPERTIES
|
||||
@@ -32,15 +46,18 @@ if (WIN32)
|
||||
COMPILE_PDB_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}"
|
||||
)
|
||||
endif(WIN32)
|
||||
+endif()
|
||||
|
||||
-install(FILES ../coreclr_delegates.h DESTINATION corehost)
|
||||
-install(FILES ../hostfxr.h DESTINATION corehost)
|
||||
-install(FILES nethost.h DESTINATION corehost)
|
||||
-install_with_stripped_symbols(nethost TARGETS corehost)
|
||||
+set(NETHOST_HEADERS nethost.h ../coreclr_delegates.h ../hostfxr.h)
|
||||
+install(FILES ${NETHOST_HEADERS} DESTINATION include)
|
||||
+install(TARGETS ${targets} EXPORT unofficial-nethost-config
|
||||
+ ARCHIVE DESTINATION lib
|
||||
+ LIBRARY DESTINATION lib
|
||||
+ RUNTIME DESTINATION bin
|
||||
+)
|
||||
|
||||
-# Only Windows creates a symbols file for static libs.
|
||||
-if (WIN32)
|
||||
- install_with_stripped_symbols(libnethost TARGETS corehost)
|
||||
-else()
|
||||
- install(TARGETS libnethost DESTINATION corehost)
|
||||
-endif(WIN32)
|
||||
\ No newline at end of file
|
||||
+install(EXPORT unofficial-nethost-config
|
||||
+ DESTINATION share/unofficial-nethost
|
||||
+ FILE unofficial-nethost-config.cmake
|
||||
+ NAMESPACE unofficial::nethost::
|
||||
+)
|
||||
diff --git a/src/native/corehost/nethost/CMakeLists.txt b/src/native/corehost/nethost/CMakeLists.txt
|
||||
index 5ae3f76e8fe..9c0209ba9bc 100644
|
||||
--- a/src/native/corehost/nethost/CMakeLists.txt
|
||||
+++ b/src/native/corehost/nethost/CMakeLists.txt
|
||||
@@ -1,11 +1,14 @@
|
||||
# Licensed to the .NET Foundation under one or more agreements.
|
||||
# The .NET Foundation licenses this file to you under the MIT license.
|
||||
|
||||
+cmake_minimum_required (VERSION 3.14.5)
|
||||
project(nethost)
|
||||
|
||||
set(DOTNET_PROJECT_NAME "nethost")
|
||||
|
||||
# Include directories
|
||||
+include(../../../../eng/native/configurepaths.cmake)
|
||||
+include("${CLR_ENG_NATIVE_DIR}/configurecompiler.cmake")
|
||||
include_directories(../fxr)
|
||||
|
||||
# CMake does not recommend using globbing since it messes with the freshness checks
|
||||
@@ -19,12 +22,23 @@ if(CLR_CMAKE_TARGET_WIN32)
|
||||
Exports.def)
|
||||
endif()
|
||||
|
||||
+if(BUILD_SHARED_LIBS)
|
||||
include(../lib.cmake)
|
||||
+set(targets nethost)
|
||||
+else()
|
||||
+include(../hostmisc/hostmisc.cmake)
|
||||
include(../lib_static.cmake)
|
||||
+add_library(nethost INTERFACE)
|
||||
+target_link_libraries(nethost INTERFACE libnethost)
|
||||
+set(targets libnethost nethost)
|
||||
+target_include_directories(libnethost INTERFACE $<INSTALL_INTERFACE:include>)
|
||||
+endif()
|
||||
+target_include_directories(nethost INTERFACE $<INSTALL_INTERFACE:include>)
|
||||
|
||||
add_definitions(-DFEATURE_LIBHOST=1)
|
||||
add_definitions(-DNETHOST_EXPORT)
|
||||
|
||||
+if(NOT BUILD_SHARED_LIBS)
|
||||
# Copy static lib PDB to the project output directory
|
||||
if (WIN32)
|
||||
set_target_properties(libnethost PROPERTIES
|
||||
@@ -32,12 +46,17 @@ if (WIN32)
|
||||
COMPILE_PDB_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}"
|
||||
)
|
||||
endif(WIN32)
|
||||
+endif()
|
||||
|
||||
-install(FILES ../coreclr_delegates.h DESTINATION corehost)
|
||||
-install(FILES ../hostfxr.h DESTINATION corehost)
|
||||
-install(FILES nethost.h DESTINATION corehost)
|
||||
-install_with_stripped_symbols(nethost TARGETS corehost)
|
||||
+set(NETHOST_HEADERS nethost.h ../coreclr_delegates.h ../hostfxr.h)
|
||||
+install(FILES ${NETHOST_HEADERS} DESTINATION include)
|
||||
+install(TARGETS ${targets} EXPORT unofficial-nethost-config
|
||||
+ ARCHIVE DESTINATION lib
|
||||
+ LIBRARY DESTINATION lib
|
||||
+ RUNTIME DESTINATION bin
|
||||
+)
|
||||
|
||||
+if(NOT BUILD_SHARED_LIBS)
|
||||
if (MSVC)
|
||||
# We ship libnethost.lib as a static library for external consumption, so
|
||||
# LTCG must be disabled to ensure that non-MSVC toolchains can work with it.
|
||||
@@ -47,10 +66,10 @@ if (MSVC)
|
||||
string(REPLACE "/LTCG" "" CMAKE_STATIC_LINKER_FLAGS_RELEASE ${CMAKE_STATIC_LINKER_FLAGS_RELEASE})
|
||||
string(REPLACE "/LTCG" "" CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO ${CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO})
|
||||
endif()
|
||||
+endif()
|
||||
|
||||
-# Only Windows creates a symbols file for static libs.
|
||||
-if (WIN32)
|
||||
- install_with_stripped_symbols(libnethost TARGETS corehost)
|
||||
-else()
|
||||
- install(TARGETS libnethost DESTINATION corehost)
|
||||
-endif(WIN32)
|
||||
+install(EXPORT unofficial-nethost-config
|
||||
+ DESTINATION share/unofficial-nethost
|
||||
+ FILE unofficial-nethost-config.cmake
|
||||
+ NAMESPACE unofficial::nethost::
|
||||
+)
|
||||
|
@ -1,16 +1,20 @@
|
||||
set(COMMIT_HASH v6.0.5)
|
||||
set(COMMIT_HASH v7.0.0)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO dotnet/runtime
|
||||
REF ${COMMIT_HASH}
|
||||
SHA512 ccf4865bd9ea63c525fc11b0008774052d51f9247427fc28a91e3836e8e8d157569565bdac17326fe44a446d98a3e4b74a55779d01bede596f2458f4ec86f3aa
|
||||
SHA512 59210df1d9541018a21a7e89e0f552ad35c849f49be31cf47e2a85086363cdabd2bf8ce652d2024479977ae059d658c3bd18de3bdaeb8cb3ddd71f2413f266bc
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
0001-nethost-cmakelists.patch
|
||||
)
|
||||
|
||||
set(PRODUCT_VERSION "6.0.5")
|
||||
set(PRODUCT_VERSION "7.0.0")
|
||||
|
||||
if(NOT VCPKG_TARGET_IS_WINDOWS)
|
||||
execute_process(COMMAND sh -c "mkdir -p ${SOURCE_PATH}/artifacts/obj && ${SOURCE_PATH}/eng/native/version/copy_version_files.sh")
|
||||
endif()
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
set(RID_PLAT "win")
|
||||
|
@ -1,9 +1,10 @@
|
||||
{
|
||||
"name": "nethost",
|
||||
"version": "6.0.5",
|
||||
"version": "7.0.0",
|
||||
"description": "Provides a set of APIs that can be used to host .NET Core (dotnet)",
|
||||
"homepage": "https://github.com/dotnet/runtime/tree/master/src/installer/corehost/cli/nethost",
|
||||
"supports": "!uwp",
|
||||
"homepage": "https://github.com/dotnet/runtime/tree/main/src/native/corehost/nethost",
|
||||
"license": "MIT",
|
||||
"supports": "(windows & !uwp), (linux, osx)",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
|
@ -5229,7 +5229,7 @@
|
||||
"port-version": 3
|
||||
},
|
||||
"nethost": {
|
||||
"baseline": "6.0.5",
|
||||
"baseline": "7.0.0",
|
||||
"port-version": 0
|
||||
},
|
||||
"nettle": {
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "d0dbe0f8de11978aea0148c9474377cdc8e88aaf",
|
||||
"version": "7.0.0",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "267a7f140709e65c5d692a7f3add885021764c25",
|
||||
"version": "6.0.5",
|
||||
|
Loading…
Reference in New Issue
Block a user