I'm having a bigger CMake project with a lot of subprojects. Almost all subprojects are written in C++, so it is no problem to integrate them simply via add_subdirectory
. There however are some parts of the project which are written in C# and Python. Both of them currently use Visual Studio Solutions to build them.
Currently we're building the CMake-stuff at first, then the solutions afterwards. We then copy the created binaries into their respective directories in the CMake install directory. It would be a lot more practical if we could just build everything with CMake.
MyProject
|
|--> CMakeLists.txt (includes all subprojects)
|
|--> SubA (C++)
|-----> CMakeLists.txt
|
|--> SubB (C++)
|-----> CMakeLists.txt
|
|--> SubC (C#)
|-----> SubC.sln
|
|--> SubD (Python)
|-----> SubD.sln
I would like to integrate them directly into the CMake environment but cannot find what the best way to do that.
Is there a way to integrate non-C++ subprojects into a CMake project? Are there any best practices for this case?
NOTE: The Python solution just calls some script-commands to convert it into an executable. No need to use the solution directly in here, this could also be done via a call to an external batch script or something like that.