@ben.boeckel it would be nice to add includes into modules.json
.
How much work would be entailed in adding a list of includes to this file for each module?
As an example, the module VTK::CommonColor
would then look something like this:
"VTK::CommonColor": {
"depends": [
"VTK::CommonCore",
"VTK::CommonDataModel"
],
"description": "",
"enabled": true,
"implementable": false,
"implements": [],
"includes": [
"vtkColorSeries.h",
"vtkNamedColors.h"
],
"kit": "VTK::Common",
"library_name": "",
"optional_depends": [],
"private_depends": [],
"third_party": false,
"wrap_exclude": false
},
If this is done then I have a reworked WhatModulesVTK.py
that is around 100 lines long and just requires modules.json
and the folder where the users code is. One of the advantages of using modules.json
is that the users configuration is included in this file so for example we automatically know whether OpenGL or OpenGL2 is being used and whether the module is enabled. Maybe we could also detect missing modules and alert the user to rebuild VTK including these.
modules.json
would grow from about 58k to about 123kb.
Currently my output from WhatModulesVTK.py
looks something like this:
find_package(VTK
COMPONENTS
CommonColor
CommonCore
FiltersSources
InteractionStyle
RenderingCore
RenderingOpenGL2
)
Note: InteractionStyle
and RenderingOpenGL2
are not automatically found on the basis of includes in the users source files.