On Friday 27 February 2015 13:29:59 Jeremy Whiting wrote: > > > 3. Use absolute paths for KDE_INSTALL_DATADIR everywhere and remove > > > ${PACKAGE_PREFIX_PATH} completely. > > > > There is KDE_INSTALL_FULL_DATADIR, which is absolute. However, that > > removes > > the relocatability of the package that ${PACKAGE_PREFIX_PATH} provides. > > I'm > > not sure just how much we care about that. > > How is that set, just at the command line with -DKDE_INSTALL_FULL_DATADIR > or I also saw some IS_RELATIVE in the code that set FULL_* if the path is > absolute, though I couldn't get that to trigger here somehow.
If KDE_INSTALL_DATADIR is absolute, KDE_INSTALL_FULL_DATADIR will be set to it. If not, KDE_INSTALL_DATADIR will be set to CMAKE_INSTALL_PREFIX/KDE_INSTALL_DATADIR. > > 4. Use the PATH_VARS to ecm_configure_package_config_file(). > > > > ecm_configure_package_config_file() behaves like > > configure_package_config_file from > > CMake 3.0, so see > > http://www.cmake.org/cmake/help/v3.1/module/CMakePackageConfigHelpers.html > > > > Basically, you add KDE_INSTALL_DATADIR to the PATH_VARS argument of > > ecm_configure_package_config_file(), and use @PACKAGE_KDE_INSTALL_DATADIR@ > > in > > your Config.cmake.in file, and it should all work. > > This sounds like the best option, could you throw together a patch to > kdoctools KF5KDocTools.ConfigCmake.cmake.in showing how that works? My > cmake foo is ok, but it would probably take me longer to do this than > someone that works with CMake every day. Yep, I'll aim to do that tomorrow. Alex