Commit 2a10009b authored by Ben Boeckel's avatar Ben Boeckel

vtkModule: document where module name == target name is assumed

In the long run, it would be nice to have exported module targets be
part of a namespace. However, the logic assumes that module names are
targets as well. There needs to be some way to find out the target name
of a module and use it instead of the module name in various locations.
parent ba1337a6
......@@ -1597,6 +1597,7 @@ function (_vtk_module_export_properties)
get_property(_vtk_export_properties_value GLOBAL
PROPERTY "_vtk_module_${_vtk_export_properties_MODULE}_${_vtk_export_properties_global}")
# XXX(namespaces): Use the target name of the module.
set(_vtk_export_properties_set_property
"set_property(TARGET \"${_vtk_export_properties_MODULE}\" PROPERTY \"INTERFACE_vtk_module_${_vtk_export_properties_global}\" \"${_vtk_export_properties_value}\")\n")
......@@ -1621,6 +1622,7 @@ function (_vtk_module_export_properties)
get_property(_vtk_export_properties_value
TARGET "${_vtk_export_properties_target_name}"
PROPERTY "${_vtk_export_properties_target}")
# XXX(namespaces): Use the target name of the module.
set(_vtk_export_properties_set_property
"set_property(TARGET \"${_vtk_export_properties_MODULE}\" PROPERTY \"${_vtk_export_properties_target}\" \"${_vtk_export_properties_value}\")\n")
......@@ -1642,6 +1644,7 @@ function (_vtk_module_export_properties)
get_property(_vtk_export_properties_value
TARGET "${_vtk_export_properties_target_name}"
PROPERTY "INTERFACE_vtk_module_${_vtk_export_properties_split}")
# XXX(namespaces): Use the target name of the module.
set(_vtk_export_properties_set_property
"set_property(TARGET \"${_vtk_export_properties_MODULE}\" PROPERTY \"INTERFACE_vtk_module_${_vtk_export_properties_split}\" \"${_vtk_export_properties_value}\")\n")
file(APPEND "${_vtk_export_properties_BUILD_FILE}"
......@@ -1650,6 +1653,7 @@ function (_vtk_module_export_properties)
get_property(_vtk_export_properties_value
TARGET "${_vtk_export_properties_target_name}"
PROPERTY "INTERFACE_vtk_module_${_vtk_export_properties_split}_install")
# XXX(namespaces): Use the target name of the module.
set(_vtk_export_properties_set_property
"set_property(TARGET \"${_vtk_export_properties_MODULE}\" PROPERTY \"INTERFACE_vtk_module_${_vtk_export_properties_split}\" \"${_vtk_export_properties_value}\")\n")
file(APPEND "${_vtk_export_properties_INSTALL_FILE}"
......@@ -1927,6 +1931,7 @@ function (vtk_module_build)
continue ()
endif ()
# XXX(namespaces): Use the target name of the module.
if (TARGET "${_vtk_build_module}")
get_property(_vtk_build_is_imported
TARGET "${_vtk_build_module}"
......@@ -2355,6 +2360,7 @@ function (vtk_module_autoinit)
list(APPEND _vtk_autoinit_seen
"${_vtk_autoinit_current_module}")
# XXX(namespaces): Use the target name of the module.
if (TARGET "${_vtk_autoinit_current_module}")
get_property(_vtk_autoinit_implements
TARGET "${_vtk_autoinit_current_module}"
......@@ -2368,6 +2374,7 @@ function (vtk_module_autoinit)
list(APPEND _vtk_autoinit_needs_implements
${_vtk_autoinit_implements})
foreach (_vtk_autoinit_implement IN LISTS _vtk_autoinit_implements)
# XXX(namespaces): Use the target name of the module.
if (TARGET "${_vtk_autoinit_implements}")
get_property(_vtk_autoinit_implementable
TARGET "${_vtk_autoinit_implement}"
......@@ -2906,6 +2913,7 @@ function (vtk_module_add_module name)
get_property(_vtk_add_module_optional_depends GLOBAL
PROPERTY "_vtk_module_${_vtk_build_module}_optional_depends")
foreach (_vtk_add_module_optional_depend IN LISTS _vtk_add_module_optional_depends)
# XXX(namespaces): Use the target name of the module.
if (TARGET "${_vtk_add_module_optional_depend}")
set(_vtk_add_module_have_optional_depend 1)
target_link_libraries("${_vtk_add_module_real_target}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment