<div dir="ltr">Hello core developers,<div><br></div><div>In the past few months some effort has been made to get the frameworks (kf5) to work on other platforms such as OS X and Windows. Together with Marko I focused primarily on OS X since there was already a patch for QStandardPaths there that worked pretty well. In discussion with the Qt developers I began to think that we maybe should be installing our data files in the places that QStandardPaths expect to find them, rather than get QStandardPaths to find files in linuxy paths.</div><div><br></div><div>Yesterday I did a test to see if I could get our data files to install to the places that QStandardPaths looks for them. All I had to do was pass -DCMAKE_INSTALL_DATADIR="/Users/jeremy/Library/Application Support/" to cmake (I added it in my .kdesrc-buildrc actually) and most of the frameworks built just fine with vanilla Qt 5.4.1. Actually even kanagram and khangman which required the QSP patch to run ran fine after I built kde with that one change.</div><div><br></div><div>One issue I found however is that some frameworks (maybe all?) have a <a href="http://KF5FooConfig.cmake.in">KF5FooConfig.cmake.in</a> with ${PACKAGE_PREFIX_PATH}/@KDE_INSTALL_DATADIR@ in them to specify where to find the data files. On my OS X install that was getting filled in as "/usr/local/Users/jeremy/Library/Application Support" which is incorrect. It seems on linux KDE_INSTALL_DATADIR is a subpath of the prefix, but that doesn't work if we are installing data files outside the prefix. So how should/could this be solved? I can think of three ideas:</div><div><br></div><div>1. Add another .<a href="http://cmake.in">cmake.in</a> specifically for platforms that install data files outside the prefix such as <a href="http://KF5FooMacConfig.cmake.in">KF5FooMacConfig.cmake.in</a> which is used on OS X to generate the KF5FooConfig.cmake and doesn't include ${PACKAGE_PREFIX_PATH}</div><div>2. Inside <a href="http://KF5FooConfig.cmake.in">KF5FooConfig.cmake.in</a> have platform detection to define whether to use the prefix or not.</div><div>3. Use absolute paths for KDE_INSTALL_DATADIR everywhere and remove ${PACKAGE_PREFIX_PATH} completely.</div><div><br></div><div>I'm not sure which approach would be best, but any would be a step closer to working better on other platforms.</div><div><br></div><div>BR,</div><div>Jeremy</div><div><br></div></div>