How to compile external libraries using cross platform toolchain?

I’ve Unreal cross platform toolchain up and running successfully in Windows. I can now generate Linux binaries for standalone simple Unreal projects from Visual Studio. This is great! The problem is that our project uses 3rd party library that has its own cmake file to build it. How do I compile such external libraries using cross platform toolchain for Unreal? I tried setting CC and CCX cmake variables to point to clang compilers available in toolchain but it appears Windows cmake always defaults to Visual Studio anyway. I’m able to compile this library using cmake in Linux and clang and use it with Unreal project without any issues. However I need to compile it using cross platform toolchain so I can generate Linux binaries that we can distribute to outside world.