In my pet project, I am using some C++ libraries. The main file/function is also C++. All of it successfully compiles with cmake. Now I want to add some functionality by calling my own D functions (which use some other modules/projects/phobos).

My questions is, what is the "proper" building tool/way.
Do I extend my CMakeFile.txt with additional instructions, which basically do a "dmd -c ...". Do I use dub to compile the D part as a library, and use that in the cmake file?
Do I use dub to compile the C++ part as well?

Surely somebody has done something similar.
Can you pinpoint me to some examples? I could go from there.

Reply via email to