CTK
CTK copied to clipboard
Ensure `CTKPluginUseFile.cmake` is "installable"
See https://github.com/commontk/CTK/issues/403#issuecomment-28420747
@saschazelzer As pointed out my @nolden, CTKPluginUseFile.cmake
is not yet configured as a relocatable file. Before I start to work on it, I have few questions:
- Is the macro
ctkFunctionGeneratePluginUseFile
used outside ofCTKGenerateCTKConfig.cmake
- Instead of configuring a file named
CTKPluginUseFile.cmake
, what do you think of having the built-in plugin headers and libraries exposed to the developers after doing either:
find_package(CTK COMPONENTS BuiltInPlugins)
or
set(CTK_USE_BuiltInPlugins 1)
find_package(CTK)
Or even better, we could have a config file generated for each plugin. For example:
-
org_commontk_eventbusConfig.cmake
-
org_commontk_plugingenerator_uiConfig.cmake
-
org_commontk_plugingenerator_coreConfig.cmake
If a plugin org_commontk_b
depends on plugin org_commontk_a
, after calling:
find_package(org_commontk_b)
it would do the following internally find org_commontk_a
which itself would find CTK
Somewhat similar to what is done in Qt5.
I completely agree. First, I would check if I can make the CTKPluginUseFile.cmake file relocatable, just to not start changing too much in the build system. A mid-term solution using individual package config files would be the better approach, as you wrote.
I don't quite get what exactly should not work by the explanation but I changed nearly nothing (https://github.com/commontk/CTK/compare/master...Warmyone:relocatable_install), cmake installed ctk, am fetching it from a repo now and have not encountered problems yet.
Should this still be an open issue? And why is the install command excluded from the superbuild setup?