CTK icon indicating copy to clipboard operation
CTK copied to clipboard

Ensure `CTKPluginUseFile.cmake` is "installable"

Open jcfr opened this issue 11 years ago • 2 comments

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 of CTKGenerateCTKConfig.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.

jcfr avatar Nov 15 '13 05:11 jcfr

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.

saschazelzer avatar Jan 16 '15 15:01 saschazelzer

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?

Warmyone avatar Mar 02 '21 18:03 Warmyone