CMake: different path for libraries and cmake modules
Mojca Miklavec
mojca at macports.org
Tue Jul 16 11:08:53 PDT 2013
Hi,
I'm trying some luck among MacPorts developers because I didn't get
any answer on the CMake mailing list.
If I want to install multiple versions of Geant4 side-by-side, I need
to move the libraries to version-specific folder with
-DCMAKE_INSTALL_LIBDIR=lib/Geant4/Geant4.9.6
but that results in CMake modules ending up in
$prefix/lib/Geant4/Geant4.9.6/Geant4-9.6.2/*.cmake
In default configuration this is ok - they should end up in
$prefix/lib/Geant4-9.6.2/*.cmake
which is the default search path for CMake modules
(lib/Package-Version/*.cmake).
But the weird path above is wrong. However, I have no idea how to move
the cmake files elsewhere. This would need a patch in Geant4
configuration to allow for something similar to
-DCMAKE_INSTALL_CMAKEMODULEDIR=lib
or
-DGEANT4_INSTALL_CMAKEMODDIR=lib
but I'm not even sure what to request from the Geant4 developers.
The only alternative is moving the cmake files "manually" (file move)
in post-destroot phase and patching some of the files afterwards. I
tried symlinking, but it didn't help (CMake files know their own
location, but they user their symlinked location, not the real one).
Is anyone aware of a better option? Or what exactly the Geant4
developers should be asked for to simplify installation without
complex patches?
There initial response was "install one version only, to the default
location, or patch yourself". (Some programs like Gate really require
a specific version of Geant.) If I suggest them a clean solution,
maybe they would be willing to patch the sources, but I don't know
myself what a clean solution would be.
Mojca
More information about the macports-dev
mailing list