<div>Hi,<br></div><div>In general, relative parameters of type PATH, like "lib" or "source/include" are resolved to an absolute path using current value of variables, like for instance: ${CMAKE_INSTALL_PREFIX} in case of command INSTALL(). This, however, does not work if I would like to use empty relative path (or not set it at all), so that the resulting absolute path was equal to ${CMAKE_INSTALL_PREFIX} - cmake generator would complain about non existing DESTINATION, although there is no reason why it couldn't be resolved. <br></div><div><br></div><div>I know two workarounds to this issue, but the both have their flaws which prevent me from achieving my goal:<br></div><div>1. Use ${CMAKE_INSTALL_PREFIX} as the DESTINATION value. This correctly resolved the path, but in case of INSTALL(EXPORT), paths in generated Target.cmake are absolute, which makes the package not relocatable.<br></div><div>2. Use '.' as the DESTINATION. This at least generates relative paths inside Target.cmake, but the paths are incorrect. '.' is apparently considered as a regular folder, and in the process of Target.cmake generation, when _IMPORT_PREFIX is determined, cmake strips one folder component too much:<br></div><div><br></div><div># Compute the installation prefix relative to this file.<br></div><div>get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)<br></div><div>get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)<br></div><div><br></div><div>Do you know any other workaround? Do you think that lack of empty relative paths could be considered a bug?<br></div><div><br></div><div>Piotr<br></div><div><br></div>