Skip to content

Commit

Permalink
cmake: Rework csproj.in and props.in
Browse files Browse the repository at this point in the history
* Add support for arm64 runtime
* Add README.md to the nuget package (new requirement)
* Add USE_DOTNET_8
  • Loading branch information
Mizux committed Jun 12, 2024
1 parent 6fcaca5 commit d559b11
Show file tree
Hide file tree
Showing 5 changed files with 150 additions and 100 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ message(STATUS ".Net: Use .Net 6 LTS support: ${USE_DOTNET_6}")

option(USE_DOTNET_7 "Use .Net 7.0 support" OFF)
message(STATUS ".Net: Use .Net 7.0 support: ${USE_DOTNET_7}")

option(USE_DOTNET_8 "Use .Net 8.0 LTS support" OFF)
message(STATUS ".Net: Use .Net 8.0 support: ${USE_DOTNET_8}")
include(dotnet)

add_subdirectory(tests)
Expand Down
177 changes: 99 additions & 78 deletions cmake/dotnet.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@ else()
endif()

# Needed by dotnet/CMakeLists.txt
set(DOTNET_PROJECT ${COMPANY_NAME}.${PROJECT_NAME})
message(STATUS ".Net project: ${DOTNET_PROJECT}")
set(DOTNET_PROJECT_DIR ${PROJECT_BINARY_DIR}/dotnet/${DOTNET_PROJECT})
message(STATUS ".Net project build path: ${DOTNET_PROJECT_DIR}")
set(DOTNET_PACKAGE ${COMPANY_NAME}.${PROJECT_NAME})
set(DOTNET_PACKAGES_DIR "${PROJECT_BINARY_DIR}/dotnet/packages")

# Runtime IDentifier
# see: https://docs.microsoft.com/en-us/dotnet/core/rid-catalog
Expand All @@ -44,13 +42,11 @@ else()
endif()
message(STATUS ".Net RID: ${DOTNET_RID}")

set(DOTNET_NATIVE_PROJECT ${DOTNET_PROJECT}.runtime.${DOTNET_RID})
set(DOTNET_NATIVE_PROJECT ${DOTNET_PACKAGE}.runtime.${DOTNET_RID})
message(STATUS ".Net runtime project: ${DOTNET_NATIVE_PROJECT}")
set(DOTNET_NATIVE_PROJECT_DIR ${PROJECT_BINARY_DIR}/dotnet/${DOTNET_NATIVE_PROJECT})
message(STATUS ".Net runtime project build path: ${DOTNET_NATIVE_PROJECT_DIR}")

set(DOTNET_PACKAGES_DIR "${PROJECT_BINARY_DIR}/dotnet/packages")

# Targeted Framework Moniker
# see: https://docs.microsoft.com/en-us/dotnet/standard/frameworks
# see: https://learn.microsoft.com/en-us/dotnet/standard/net-standard
Expand Down Expand Up @@ -81,6 +77,9 @@ endif()
if(USE_DOTNET_7)
list(APPEND TFM "net7.0")
endif()
if(USE_DOTNET_8)
list(APPEND TFM "net8.0")
endif()

list(LENGTH TFM TFM_LENGTH)
if(TFM_LENGTH EQUAL "0")
Expand All @@ -95,10 +94,15 @@ else()
string(CONCAT DOTNET_TFM "<TargetFramework>" "${DOTNET_TFM}" "</TargetFramework>")
endif()


set(DOTNET_PROJECT ${DOTNET_PACKAGE})
message(STATUS ".Net project: ${DOTNET_PROJECT}")
set(DOTNET_PROJECT_DIR ${PROJECT_BINARY_DIR}/dotnet/${DOTNET_PROJECT})
message(STATUS ".Net project build path: ${DOTNET_PROJECT_DIR}")

# Create the native library
string(TOLOWER "${COMPANY_NAME}_${PROJECT_NAME}_native" DOTNET_NATIVE_LIBRARY)
message(STATUS ".Net runtime library: ${DOTNET_NATIVE_LIBRARY}")

add_library(${DOTNET_NATIVE_LIBRARY} SHARED "")
set_target_properties(${DOTNET_NATIVE_LIBRARY} PROPERTIES
PREFIX ""
Expand All @@ -119,17 +123,97 @@ elseif(UNIX)
INSTALL_RPATH "$ORIGIN")
endif()

#################
## .Net Test ##
#################
# add_dotnet_test()
# CMake function to generate and build dotnet test.
# Parameters:
# the dotnet filename
# e.g.:
# add_dotnet_test(FooTests.cs)
function(add_dotnet_test FILE_NAME)
message(STATUS "Configuring test ${FILE_NAME} ...")
get_filename_component(TEST_NAME ${FILE_NAME} NAME_WE)
get_filename_component(COMPONENT_DIR ${FILE_NAME} DIRECTORY)
get_filename_component(COMPONENT_NAME ${COMPONENT_DIR} NAME)

set(DOTNET_TEST_DIR ${PROJECT_BINARY_DIR}/dotnet/${COMPONENT_NAME}/${TEST_NAME})
message(STATUS "build path: ${DOTNET_TEST_DIR}")

configure_file(
${PROJECT_SOURCE_DIR}/dotnet/Test.csproj.in
${DOTNET_TEST_DIR}/${TEST_NAME}.csproj
@ONLY)

add_custom_command(
OUTPUT ${DOTNET_TEST_DIR}/${TEST_NAME}.cs
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOTNET_TEST_DIR}
COMMAND ${CMAKE_COMMAND} -E copy
${FILE_NAME}
${DOTNET_TEST_DIR}/
MAIN_DEPENDENCY ${FILE_NAME}
VERBATIM
WORKING_DIRECTORY ${DOTNET_TEST_DIR})

add_custom_command(
OUTPUT ${DOTNET_TEST_DIR}/timestamp
COMMAND ${CMAKE_COMMAND} -E env --unset=TARGETNAME
${DOTNET_EXECUTABLE} build --nologo -c Release ${TEST_NAME}.csproj
COMMAND ${CMAKE_COMMAND} -E touch ${DOTNET_TEST_DIR}/timestamp
DEPENDS
${DOTNET_TEST_DIR}/${TEST_NAME}.csproj
${DOTNET_TEST_DIR}/${TEST_NAME}.cs
dotnet_package
BYPRODUCTS
${DOTNET_TEST_DIR}/bin
${DOTNET_TEST_DIR}/obj
VERBATIM
COMMENT "Compiling .Net ${COMPONENT_NAME}/${TEST_NAME}.cs (${DOTNET_TEST_DIR}/timestamp)"
WORKING_DIRECTORY ${DOTNET_TEST_DIR})

add_custom_target(dotnet_${COMPONENT_NAME}_${TEST_NAME} ALL
DEPENDS
${DOTNET_TEST_DIR}/timestamp
WORKING_DIRECTORY ${DOTNET_TEST_DIR})

if(BUILD_TESTING)
add_test(
NAME dotnet_${COMPONENT_NAME}_${TEST_NAME}
COMMAND ${CMAKE_COMMAND} -E env --unset=TARGETNAME
${DOTNET_EXECUTABLE} test --nologo --no-build -c Release ${TEST_NAME}.csproj
WORKING_DIRECTORY ${DOTNET_TEST_DIR})
endif()
message(STATUS "Configuring test ${FILE_NAME} ...DONE")
endfunction()


#######################
## DOTNET WRAPPERS ##
#######################
list(APPEND CMAKE_SWIG_FLAGS ${FLAGS} "-I${PROJECT_SOURCE_DIR}")

# Swig wrap all libraries
foreach(SUBPROJECT IN ITEMS Foo Bar FooBar)
foreach(SUBPROJECT IN ITEMS
Foo
Bar
FooBar)
add_subdirectory(${SUBPROJECT}/dotnet)
target_link_libraries(${DOTNET_NATIVE_LIBRARY} PRIVATE dotnet_${SUBPROJECT})
endforeach()

file(COPY ${PROJECT_SOURCE_DIR}/dotnet/logo.png DESTINATION ${PROJECT_BINARY_DIR}/dotnet)
set(DOTNET_LOGO_DIR "${PROJECT_BINARY_DIR}/dotnet")
configure_file(${PROJECT_SOURCE_DIR}/dotnet/Directory.Build.props.in ${PROJECT_BINARY_DIR}/dotnet/Directory.Build.props)

configure_file(
${PROJECT_SOURCE_DIR}/dotnet/README.dotnet.md
${PROJECT_BINARY_DIR}/dotnet/README.md
COPYONLY)
set(DOTNET_README_DIR "${PROJECT_BINARY_DIR}/dotnet")

configure_file(
${PROJECT_SOURCE_DIR}/dotnet/Directory.Build.props.in
${PROJECT_BINARY_DIR}/dotnet/Directory.Build.props)

file(MAKE_DIRECTORY ${DOTNET_PACKAGES_DIR})
############################
Expand All @@ -139,7 +223,7 @@ file(MAKE_DIRECTORY ${DOTNET_PACKAGES_DIR})
# CMake variable(s) (@PROJECT_NAME@) that configure_file() can manage and
# generator expression ($<TARGET_FILE:...>) that file(GENERATE) can manage.
configure_file(
${PROJECT_SOURCE_DIR}/dotnet/${DOTNET_PROJECT}.runtime.csproj.in
${PROJECT_SOURCE_DIR}/dotnet/${DOTNET_PACKAGE}.runtime.csproj.in
${DOTNET_NATIVE_PROJECT_DIR}/${DOTNET_NATIVE_PROJECT}.csproj.in
@ONLY)
file(GENERATE
Expand All @@ -156,9 +240,9 @@ add_custom_command(
add_custom_command(
OUTPUT ${DOTNET_NATIVE_PROJECT_DIR}/timestamp
COMMAND ${CMAKE_COMMAND} -E env --unset=TARGETNAME
${DOTNET_EXECUTABLE} build --nologo -c Release /p:Platform=${DOTNET_PLATFORM} ${DOTNET_NATIVE_PROJECT}.csproj
${DOTNET_EXECUTABLE} build --nologo -c Release -p:Platform=${DOTNET_PLATFORM} ${DOTNET_NATIVE_PROJECT}.csproj
COMMAND ${CMAKE_COMMAND} -E env --unset=TARGETNAME
${DOTNET_EXECUTABLE} pack --nologo -c Release ${DOTNET_NATIVE_PROJECT}.csproj
${DOTNET_EXECUTABLE} pack --nologo -c Release -p:Platform=${DOTNET_PLATFORM} ${DOTNET_NATIVE_PROJECT}.csproj
COMMAND ${CMAKE_COMMAND} -E touch ${DOTNET_NATIVE_PROJECT_DIR}/timestamp
DEPENDS
${PROJECT_BINARY_DIR}/dotnet/Directory.Build.props
Expand Down Expand Up @@ -194,9 +278,9 @@ add_custom_command(
add_custom_command(
OUTPUT ${DOTNET_PROJECT_DIR}/timestamp
COMMAND ${CMAKE_COMMAND} -E env --unset=TARGETNAME
${DOTNET_EXECUTABLE} build --nologo -c Release /p:Platform=${DOTNET_PLATFORM} ${DOTNET_PROJECT}.csproj
${DOTNET_EXECUTABLE} build --nologo -c Release -p:Platform=${DOTNET_PLATFORM} ${DOTNET_PROJECT}.csproj
COMMAND ${CMAKE_COMMAND} -E env --unset=TARGETNAME
${DOTNET_EXECUTABLE} pack --nologo -c Release ${DOTNET_PROJECT}.csproj
${DOTNET_EXECUTABLE} pack --nologo -c Release -p:Platform=${DOTNET_PLATFORM} ${DOTNET_PROJECT}.csproj
COMMAND ${CMAKE_COMMAND} -E touch ${DOTNET_PROJECT_DIR}/timestamp
DEPENDS
${DOTNET_PROJECT_DIR}/${DOTNET_PROJECT}.csproj
Expand All @@ -213,69 +297,6 @@ add_custom_target(dotnet_package ALL
${DOTNET_PROJECT_DIR}/timestamp
WORKING_DIRECTORY ${DOTNET_PROJECT_DIR})

#################
## .Net Test ##
#################
# add_dotnet_test()
# CMake function to generate and build dotnet test.
# Parameters:
# the dotnet filename
# e.g.:
# add_dotnet_test(FooTests.cs)
function(add_dotnet_test FILE_NAME)
message(STATUS "Configuring test ${FILE_NAME} ...")
get_filename_component(TEST_NAME ${FILE_NAME} NAME_WE)
get_filename_component(COMPONENT_DIR ${FILE_NAME} DIRECTORY)
get_filename_component(COMPONENT_NAME ${COMPONENT_DIR} NAME)

set(DOTNET_TEST_DIR ${PROJECT_BINARY_DIR}/dotnet/${COMPONENT_NAME}/${TEST_NAME})
message(STATUS "build path: ${DOTNET_TEST_DIR}")

configure_file(
${PROJECT_SOURCE_DIR}/dotnet/Test.csproj.in
${DOTNET_TEST_DIR}/${TEST_NAME}.csproj
@ONLY)

add_custom_command(
OUTPUT ${DOTNET_TEST_DIR}/${TEST_NAME}.cs
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOTNET_TEST_DIR}
COMMAND ${CMAKE_COMMAND} -E copy
${FILE_NAME}
${DOTNET_TEST_DIR}/
MAIN_DEPENDENCY ${FILE_NAME}
VERBATIM
WORKING_DIRECTORY ${DOTNET_TEST_DIR})

add_custom_command(
OUTPUT ${DOTNET_TEST_DIR}/timestamp
COMMAND ${CMAKE_COMMAND} -E env --unset=TARGETNAME
${DOTNET_EXECUTABLE} build --nologo -c Release ${TEST_NAME}.csproj
COMMAND ${CMAKE_COMMAND} -E touch ${DOTNET_TEST_DIR}/timestamp
DEPENDS
${DOTNET_TEST_DIR}/${TEST_NAME}.csproj
${DOTNET_TEST_DIR}/${TEST_NAME}.cs
dotnet_package
BYPRODUCTS
${DOTNET_TEST_DIR}/bin
${DOTNET_TEST_DIR}/obj
VERBATIM
COMMENT "Compiling .Net ${COMPONENT_NAME}/${TEST_NAME}.cs (${DOTNET_TEST_DIR}/timestamp)"
WORKING_DIRECTORY ${DOTNET_TEST_DIR})

add_custom_target(dotnet_${COMPONENT_NAME}_${TEST_NAME} ALL
DEPENDS
${DOTNET_TEST_DIR}/timestamp
WORKING_DIRECTORY ${DOTNET_TEST_DIR})

if(BUILD_TESTING)
add_test(
NAME dotnet_${COMPONENT_NAME}_${TEST_NAME}
COMMAND ${CMAKE_COMMAND} -E env --unset=TARGETNAME ${DOTNET_EXECUTABLE} test --no-build -c Release ${TEST_NAME}.csproj
WORKING_DIRECTORY ${DOTNET_TEST_DIR})
endif()
message(STATUS "Configuring test ${FILE_NAME} done")
endfunction()

####################
## .Net Example ##
####################
Expand Down
8 changes: 6 additions & 2 deletions dotnet/Directory.Build.props.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<MinClientVersion>4.1.0</MinClientVersion>
<NeutralLanguage>en-US</NeutralLanguage>
<Authors>Mizux</Authors>
<Company>Google LLC</Company>
<Copyright>Copyright 2020 Google LLC</Copyright>
<Company>@COMPANY_NAME@</Company>
<Copyright>Copyright @COMPANY_NAME@</Copyright>

<!-- Pack Option -->
<PackageTags>native;sample</PackageTags>
Expand All @@ -29,6 +29,10 @@
<Pack>True</Pack>
<PackagePath>content</PackagePath>
</None>
<None Include="@DOTNET_README_DIR@/README.md">
<Pack>True</Pack>
<PackagePath>content</PackagePath>
</None>
</ItemGroup>
<PropertyGroup Label="BasePath">
<SolutionDir Condition="'$(SolutionDir)'==''">$(MSBuildThisFileDirectory)</SolutionDir>
Expand Down
50 changes: 30 additions & 20 deletions dotnet/Mizux.DotnetNative.csproj.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
@DOTNET_TFM@
<RuntimeIdentifiers>linux-x64;osx-x64;win-x64</RuntimeIdentifiers>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AssemblyName>@DOTNET_PROJECT@</AssemblyName>
<AssemblyName>@DOTNET_PACKAGE@</AssemblyName>
<Version>@PROJECT_VERSION@</Version>

<!-- Nuget Properties -->
<Description>.NET wrapper for the DotnetNative project</Description>

<!-- Pack Option -->
<Title>@DOTNET_PROJECT@ v@PROJECT_VERSION@</Title>
<PackageId>@DOTNET_PROJECT@</PackageId>
<Title>@DOTNET_PACKAGE@ v@PROJECT_VERSION@</Title>
<PackageId>@DOTNET_PACKAGE@</PackageId>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>

Expand All @@ -24,20 +24,26 @@
</PropertyGroup>

<!-- Validate at least one runtime package has been generated -->
<Target Name="ValidateRuntimePack" BeforeTargets="GenerateNuspec">
<Target Name="ValidateRuntimePackage" BeforeTargets="GenerateNuspec">
<ItemGroup>
<RuntimeLinux Include="@DOTNET_PACKAGES_DIR@/@DOTNET_PROJECT@.runtime.linux-x64.*.nupkg"/>
<RuntimeOsx Include="@DOTNET_PACKAGES_DIR@/@DOTNET_PROJECT@.runtime.osx-x64.*.nupkg"/>
<RuntimeWin Include="@DOTNET_PACKAGES_DIR@/@DOTNET_PROJECT@.runtime.win-x64.*.nupkg"/>
<RuntimeLinuxX64 Include="@DOTNET_PACKAGES_DIR@/@DOTNET_PACKAGE@.runtime.linux-x64.*.nupkg"/>
<RuntimeOsxX64 Include="@DOTNET_PACKAGES_DIR@/@DOTNET_PACKAGE@.runtime.osx-x64.*.nupkg"/>
<RuntimeWinX64 Include="@DOTNET_PACKAGES_DIR@/@DOTNET_PACKAGE@.runtime.win-x64.*.nupkg"/>
<RuntimeLinuxArm64 Include="@DOTNET_PACKAGES_DIR@/@DOTNET_PACKAGE@.runtime.linux-arm64.*.nupkg"/>
<RuntimeOsxArm64 Include="@DOTNET_PACKAGES_DIR@/@DOTNET_PACKAGE@.runtime.osx-arm64.*.nupkg"/>
</ItemGroup>
<Message Importance="high" Text="Package @DOTNET_PROJECT@.runtime.linux-x64: found" Condition="Exists('@(RuntimeLinux)')"/>
<Message Importance="high" Text="------- $(OS) "/>
<Message Importance="high" Text="Package @DOTNET_PROJECT@.runtime.linux-x64: not found" Condition="!Exists('@(RuntimeLinux)')"/>
<Message Importance="high" Text="Package @DOTNET_PROJECT@.runtime.osx-x64: found" Condition="Exists('@(RuntimeOsx)')"/>
<Message Importance="high" Text="Package @DOTNET_PROJECT@.runtime.osx-x64: not found" Condition="!Exists('@(RuntimeOsx)')"/>
<Message Importance="high" Text="Package @DOTNET_PROJECT@.runtime.win-x64: found" Condition="Exists('@(RuntimeWin)')"/>
<Message Importance="high" Text="Package @DOTNET_PROJECT@.runtime.win-x64: not found" Condition="!Exists('@(RuntimeWin)')"/>
<Error Text="You must locally 'dotnet pack' at least one @DOTNET_PROJECT@.runtime.{rid} Project." Condition="!Exists('@(RuntimeLinux)') AND !Exists('@(RuntimeOsx)') AND !Exists('@(RuntimeWin)')"/>
<Message Importance="high" Text="Package @DOTNET_PACKAGE@.runtime.linux-x64: found" Condition="Exists('@(RuntimeLinuxX64)')"/>
<Message Importance="high" Text="Package @DOTNET_PACKAGE@.runtime.linux-x64: not found" Condition="!Exists('@(RuntimeLinuxX64)')"/>
<Message Importance="high" Text="Package @DOTNET_PACKAGE@.runtime.osx-x64: found" Condition="Exists('@(RuntimeOsxX64)')"/>
<Message Importance="high" Text="Package @DOTNET_PACKAGE@.runtime.osx-x64: not found" Condition="!Exists('@(RuntimeOsxX64)')"/>
<Message Importance="high" Text="Package @DOTNET_PACKAGE@.runtime.win-x64: found" Condition="Exists('@(RuntimeWinX64)')"/>
<Message Importance="high" Text="Package @DOTNET_PACKAGE@.runtime.win-x64: not found" Condition="!Exists('@(RuntimeWinX64)')"/>
<Message Importance="high" Text="Package @DOTNET_PACKAGE@.runtime.linux-arm64: found" Condition="Exists('@(RuntimeLinuxArm64)')"/>
<Message Importance="high" Text="Package @DOTNET_PACKAGE@.runtime.linux-arm64: not found" Condition="!Exists('@(RuntimeLinuxArm64)')"/>
<Message Importance="high" Text="Package @DOTNET_PACKAGE@.runtime.osx-arm64: found" Condition="Exists('@(RuntimeOsxArm64)')"/>
<Message Importance="high" Text="Package @DOTNET_PACKAGE@.runtime.osx-arm64: not found" Condition="!Exists('@(RuntimeOsxArm64)')"/>
<Error Text="You must locally 'dotnet pack' at least one @DOTNET_PACKAGE@.runtime.{rid} Project." Condition="!Exists('@(RuntimeLinuxX64)') AND !Exists('@(RuntimeOsxX64)') AND !Exists('@(RuntimeWinX64)') AND !Exists('@(RuntimeLinuxArm64)') AND !Exists('@(RuntimeOsxArm64)')"/>
</Target>

<!-- Need to add required runtime dependencies so Meta-Project will pull runtime Nuget(s) -->
Expand All @@ -46,12 +52,16 @@
</PropertyGroup>

<ItemGroup>
<RuntimeLinux Include="@DOTNET_PACKAGES_DIR@/@DOTNET_PROJECT@.runtime.linux-x64.*.nupkg"/>
<RuntimeOsx Include="@DOTNET_PACKAGES_DIR@/@DOTNET_PROJECT@.runtime.osx-x64.*.nupkg"/>
<RuntimeWin Include="@DOTNET_PACKAGES_DIR@/@DOTNET_PROJECT@.runtime.win-x64.*.nupkg"/>
<PackageReference Include="@DOTNET_PROJECT@.runtime.linux-x64" Version="@PROJECT_VERSION@" Condition="Exists('@(RuntimeLinux)')"/>
<PackageReference Include="@DOTNET_PROJECT@.runtime.osx-x64" Version="@PROJECT_VERSION@" Condition="Exists('@(RuntimeOsx)')" />
<PackageReference Include="@DOTNET_PROJECT@.runtime.win-x64" Version="@PROJECT_VERSION@" Condition="Exists('@(RuntimeWin)')" />
<RuntimeLinuxX64 Include="@DOTNET_PACKAGES_DIR@/@DOTNET_PACKAGE@.runtime.linux-x64.*.nupkg"/>
<RuntimeOsxX64 Include="@DOTNET_PACKAGES_DIR@/@DOTNET_PACKAGE@.runtime.osx-x64.*.nupkg"/>
<RuntimeWinX64 Include="@DOTNET_PACKAGES_DIR@/@DOTNET_PACKAGE@.runtime.win-x64.*.nupkg"/>
<RuntimeLinuxArm64 Include="@DOTNET_PACKAGES_DIR@/@DOTNET_PACKAGE@.runtime.linux-arm64.*.nupkg"/>
<RuntimeOsxArm64 Include="@DOTNET_PACKAGES_DIR@/@DOTNET_PACKAGE@.runtime.osx-arm64.*.nupkg"/>
<PackageReference Include="@DOTNET_PACKAGE@.runtime.linux-x64" Version="@PROJECT_VERSION@" Condition="Exists('@(RuntimeLinuxX64)')"/>
<PackageReference Include="@DOTNET_PACKAGE@.runtime.osx-x64" Version="@PROJECT_VERSION@" Condition="Exists('@(RuntimeOsxX64)')" />
<PackageReference Include="@DOTNET_PACKAGE@.runtime.win-x64" Version="@PROJECT_VERSION@" Condition="Exists('@(RuntimeWinX64)')" />
<PackageReference Include="@DOTNET_PACKAGE@.runtime.linux-arm64" Version="@PROJECT_VERSION@" Condition="Exists('@(RuntimeLinuxArm64)')"/>
<PackageReference Include="@DOTNET_PACKAGE@.runtime.osx-arm64" Version="@PROJECT_VERSION@" Condition="Exists('@(RuntimeOsxArm64)')" />
</ItemGroup>
</Project>

12 changes: 12 additions & 0 deletions dotnet/README.dotnet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Dotnet Native

This is the .Net wrapper package of a C++ library.

## About

OSS project to show ho you can wrap a C++ library in a .Net package using SWIG.

## License

This project is licensed under the terms of the Apache License 2.0.

0 comments on commit d559b11

Please sign in to comment.