[cmake-developers] New property scope for install()ed files?

Nils Gladitz nilsgladitz at gmail.com
Thu May 15 09:50:22 EDT 2014


On 05/15/2014 03:06 PM, Brad King wrote:
> Here is a quick brainstorm:
>
> Just like CTestTestfile for testing and cmake_install for installation,
> perhaps we need a per-directory hierarchical cmake_package for CPack.
> We could re-use source file properties.  When the install() command
> is installing a file it can check for "CPACK_*" source file properties
> and add them for generation into cmake_package.  In cmake_package we
> could just use source file properties set on paths corresponding to
> install tree locations.  I'm sure there will be some details to work
> out for that.

Thank you for your feedback!

I was thinking about using destination paths as the property key in 
CMakeLists.txt code consistently since this would also work for files 
created by any type of installation (including CODE/SCRIPT).

I would also write out the properties (if any exist) irregardless of any 
corresponding install() since files may be installed which CMake itself 
does not know about.

I think it would be preferable if the properties weren't directory 
scoped like source file properties are since the installed artifacts 
don't necessarily mirror a project's source directory hierarchy which 
CPack itself also doesn't operate on.

A single (optional)
- cmake_package.cmake
- cpack_properties.cmake
- or CMakeCPackProperties.cmake?

file in the root directory might also make more sense when CPack is used 
without CMake.

Nils



More information about the cmake-developers mailing list