CMake package files location

David Faure faure at kde.org
Sun Jun 1 07:34:16 UTC 2014


On Sunday 18 May 2014 15:36:38 Alex Merry wrote:
> I'm reviewing the frameworks I maintain, and one of things listed that I
> should check is the directory structure:
> http://community.kde.org/Frameworks/Policies#Framework_directory_structure
> 
> This has the line "CMake modules (FindFoo.cmake etc.) or CMake macro
> files go into cmake subdirectory". Now, I'm not sure whether
> KF5DesignerPluginMacros.cmake should go in a cmake/ subdirectory, or in
> the root directory with KF5DesginerPluginConfig.cmake.in (since it is
> installed alongside that file. The frameworks are not consistent on this
> point.
> 
> My view is that all the package files (those installed to
> $PREFIX/lib/cmake/PackageName) should live in the same place, whether
> that is in the root directory or in the cmake directory. Also, we should
> be consistent on this location, and document it.
> 
> I don't have a strong preference for whether these files go into cmake/
> or not, but I'm going to adopt the default position of saying they
> should go in the root directory (including KF5FooMacros.cmake), as that
> involves the least work.
> 
> Does anyone object to this?

Another view is that all frameworks have a *Config.cmake file so that one 
belongs in the root (it's part of the "skeleton"), but all the extra stuff 
(Macros, FindFoo.cmake) are "source" files that should go into a cmake subdir,
just like we put C++ source files in a subdir too. Just to keep the root a 
little less messy.

In KDocTools that would mean "mv KF5DocToolsMacros.cmake cmake/"

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5



More information about the Kde-frameworks-devel mailing list