Split non-game code in modular way?

I’m using clion plugin.
It creates CMakeLists.txt file in the root of my project (further Root)
I want to create a separated module that contains triangulation functions and I want to debug it bypassing UE (e.g. visualize in qt window and debug if needed)
In UE I just want to include functions that I need from this module and convert their output to real UE’s data structures

Issues in which I stuck in:

  1. What path should I use for this module (Plugins, Sources, MyOwnPath)?
  2. How to blacklist compilation of cmake-build-debug directory and main.cpp?
  3. How do I include needed files in my Sources files

I read about .umodule and creating a lot of c-sharp code to create a module but I think it’s not what I want. If I understood right it creates a module that can be used in game directly but I need a library-like module.

If I explained confusedly here is the way I did before in unity3d. In unity I just create a directory called Scripts and MyModule directory in it. Then I just write code in MyModule and include it in my MonoBehaviour scripts when needed. I could use non-unity3d tools to run my MyModule code a standalone application but in UE I don’t understand how can I do it