From: Guillaume R. <gui...@gm...> - 2011-02-20 17:22:52
|
Hello. I'm packaging freeorion 0.3.15 for mandriva Linux. However, I've a small issue with files setup. First, I need to install the binaries under /usr/games, and the data under /usr/share/games, for FHS compliance. But the cmakefile configuration seems to install everything related to CMAKE_INSTALL_PREFIX directly, without allowing to pass additional configuration flags. I've been reading the various CMakefile.txt files without finding anything pertaining to data files installation, only a generated cmake_install.cmake file, for which I couldn't find the origin. Second, the code for GetDataRootDir (and probably others), use an hard-coded location (/usr/local/share for Linux), whereas this location is actually determined at install time, and should be registered at that moment. In autotools world, the configuration process creates a config.h with all relevant informations, that can be included in binaries to handle this. I have no clue about how to do this with cmake, tough. Currently, I install file manually, and patch Directories.cpp to hardcode another directory, but that's not a generic solution. A beter solution would be a way to build with something as: cmake -DCMAKE_INSTALL_PREFIX=/usr/games -DDATA_INSTALL_PREFIX=/usr/share/games And have the resulting binary automatically configured. Again, I'd be delighted to provide a patch myself, but I don't know cmake enough for this. -- BOFH excuse #298: Not enough interrupts |