This question stems from our attempts to package OCCT 7.1.0 for the Ubuntu PPA. https://forum.freecadweb.org/viewtopic.php?f=4&t=17501&start=110#p162301
These are the modules supplied by OCCT, and the toolkits they contain:
FoundationClasses TKernel TKMath
ModelingData TKG2d TKG3d TKGeomBase TKBRep
ModelingAlgorithms TKGeomAlgo TKTopAlgo TKPrim TKBO TKBool TKHLR TKFillet TKOffset TKFeat TKMesh TKXMesh TKShHealing
Visualization TKService TKV3d TKOpenGl TKMeshVS TKIVtk TKD3DHost
ApplicationFramework TKCDF TKLCAF TKCAF TKBinL TKXmlL TKBin TKXml TKStdL TKStd TKTObj TKBinTObj TKXmlTObj TKVCAF
DataExchange TKXSBase TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP TKIGES TKXCAF TKXDEIGES TKXDESTEP TKSTL TKVRML TKXmlXCAF TKBinXCAF
Draw TKDraw TKTopTest TKViewerTest TKXSDRAW TKDCAF TKXDEDRAW TKTObjDRAW TKQADraw TKIVtkDraw DRAWEXE
I know FreeCAD needs Foundation, Modeling Data/Algos, Data Exchange. It does not need Visualization nor the Draw Harness (I think?).
What about ApplicationFramework? Are all its toolkits required? Some of them rely on X11 and I think that's the cause for it depending on visualization. I'd like to be able to compile FreeCAD without visualization, but it's a hard dependency of OCAF. If we have no choice we'll turn off visualization building and leave it off from the packages but I'd rather try to see if the hard dependency can be broken somehow.
Last fall an OCCT developer joined the topic I linked and suggested to create as many packages as there are toolkits so we could install only what we need.
It would be great if one of you devs could shed some light on the matter!