-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use nethost to find coreclr without starting up the runtime
- Loading branch information
Showing
13 changed files
with
139 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
execute_process( | ||
COMMAND dotnet msbuild FindNetHostDir.proj -t:OutputNetHostDir -nologo | ||
OUTPUT_VARIABLE NET_HOST_DIR | ||
OUTPUT_STRIP_TRAILING_WHITESPACE | ||
COMMAND_ERROR_IS_FATAL ANY | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) | ||
|
||
string(STRIP ${NET_HOST_DIR} NET_HOST_DIR) | ||
|
||
if (WIN32) | ||
add_library(nethost IMPORTED SHARED) | ||
set_target_properties(nethost PROPERTIES | ||
IMPORTED_LOCATION ${NET_HOST_DIR}/nethost.dll | ||
IMPORTED_IMPLIB ${NET_HOST_DIR}/nethost.lib) | ||
else() | ||
add_library(nethost IMPORTED STATIC) | ||
target_compile_definitions(nethost INTERFACE NETHOST_USE_AS_STATIC) | ||
set_target_properties(nethost PROPERTIES | ||
IMPORTED_LOCATION ${NET_HOST_DIR}/libnethost.a) | ||
endif() | ||
|
||
target_include_directories(nethost INTERFACE ${NET_HOST_DIR}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<Project Sdk="Microsoft.NET.Sdk" DefaultTargets="OutputNetHostDir"> | ||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
</PropertyGroup> | ||
<Target Name="OutputNetHostDir"> | ||
<Message Text="$(NetCoreTargetingPackRoot)/Microsoft.NETCore.App.Host.$(NETCoreSdkRuntimeIdentifier)/$(BundledNETCoreAppPackageVersion)/runtimes/$(NETCoreSdkRuntimeIdentifier)/native" Importance="high" /> | ||
</Target> | ||
</Project> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.