Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for building your own *.csproj files #5

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

hoffmann-stefan
Copy link
Member

@hoffmann-stefan hoffmann-stefan commented Apr 23, 2023

upstream PR for this internal one: schiller-de#1

New variants of add_dotnet_*

This PR adds the posibility to use your own *.csproj files instead of generating one with cmake.
This makes it easier to use advanced *.csproj features needed for ASP.NET as the developer can directly manipulate the .csproj file.

This is how the new commands corespond to the existing ones:

add_dotnet_executable -> add_dotnet_executable_project
add_dotnet_library -> add_dotnet_library_project
add_dotnet_test -> add_dotnet_test_project

Example:

...
set(_assemblies_dep_dlls
    ${rcldotnet_common_ASSEMBLIES_DLL}
    ${rcldotnet_ASSEMBLIES_DLL}
    ${std_msgs_ASSEMBLIES_DLL}
    ${std_srvs_ASSEMBLIES_DLL}
)

add_dotnet_executable_project(RosBlazorExample
  PROJ
  src/RosBlazorExample/RosBlazorExample.csproj
  INCLUDE_DLLS
  ${_assemblies_dep_dlls}
)

install_dotnet(RosBlazorExample
  CD_TO_EXECUTABLE
  ENTRY_POINT_NAME
  ros_blazor_example
  DESTINATION
  lib/${PROJECT_NAME}/dotnet
)
...

RosBlazorExample.csproj needs to import a generated file for this to work:

  <Import Project="obj/CMake.g.props"/>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants