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

Brad King brad.king at kitware.com
Thu May 15 10:02:42 EDT 2014


On 05/15/2014 09:50 AM, Nils Gladitz wrote:
> 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).

Yes, that makes sense.  The keys could each be either a relative path
(to the install prefix) or an absolute path.  We would not need any
new commands.  The set_property and get_property command could learn
a new type for this.  Do you have a name in mind?

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

Given the above association, yes.

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

Yes.

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

The reason cmake_install.cmake is sprinkled in each directory is so
the makefile generators can support "cd subdir; make install".
I do not think we support this with CPack so a single file at the
top makes sense.  I think the name should start in "CPack" but
otherwise have no preference currently.

Thanks,
-Brad




More information about the cmake-developers mailing list