What is the right way to add plugin to the cocos2d-x ver 3 structure

I what to publish plugin that is for android / ios /windows
that will use third party library’s , its not GUI extension and not implementing
the cocos plug ins protocol.
what is the right way to implement the third party library’s cross platform compilation
and exposing the developers the interface of the plugins .
i don’t need technical solution but files structure and configuration i need to follow to implement it in to cocos2d-x build

#UPDATE:
ok i put the sources in the external dir , my new question is where in cocos framework
i put the include directory so it can be seams from the cocos2d projects