[CMake] install DESTINATION parameter - why can't be empty? Workarounds don't work.

2017-08-18 Thread drgutek
Hi, 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 (

[CMake] Create relocatable package with proper autogenerated config cmake

2017-08-17 Thread drgutek
Hi, I have created cmake target, say A , and want to install it and create a Config file, so that the installed package could be relocatable. My code is: install(EXPORT ${PROJECT_NAME}Targets FILE ${PROJECT_NAME}Targets.cmake NAMESPACE ${PROJECT_NAME}:: DESTINATION ??? ) Here, I