0

My project is having c, cpp,c# files on different modules.I am trying to build the entire project with cmake.I am able to compile the c,cpp files with CMakeLists configurations, but I have problem with compiling c# files with CMakeLists configuration.

I am not clear how to write the CMakeLists.txt file for C# projects. Is that cmake supports the c# projects or not ?. If cmake supports csharp please provide sample CMakeLists.txt if any.

123r789
  • 1,600
  • 3
  • 22
  • 33
  • Why would you want to do that?! and how would you manage all the non-cs info in the csproj file e.g. references, resources, templates... – Danny Varod Oct 21 '13 at 10:53
  • 1
    I would like to cross compile my entire project with cmake. – 123r789 Oct 21 '13 at 10:55
  • I need to build the project in linux as well as windows environment.Build any project in both linux and windows is possible with cmake. – 123r789 Oct 21 '13 at 11:00
  • Use Mono. - You should use the right tool for each problem. – Danny Varod Oct 21 '13 at 11:04
  • To clarify, CMake 3.8 and greater now fully supports the C# language. My [answer](https://stackoverflow.com/a/55420842/3987854) on your other question has an example. – Kevin Mar 29 '19 at 15:43

1 Answers1

0

Actually, have very little experience with CMake, but look at this one. As I understand they have a codebase similar to yours.

Also, see this discussion. And this.

Community
  • 1
  • 1
galenus
  • 2,087
  • 16
  • 24