Multiple LDC installations

Kai Nacke kai at redstar.de
Thu Nov 14 04:58:05 PST 2013


On Thursday, 14 November 2013 at 09:51:11 UTC, Marco Leise wrote:
> I would like to get multiple system installations of LDC
> working on Gentoo, by renaming binaries and paths. I've got
> that working for DMD, but I can't get my head around CMake. I
> thought I could just append the version (0.12.0) to the
> LDC_EXE_NAME, but that broke the build process with make -j3.
> And otherwise it seems to use the installed /usr/bin/ldc2 as a
> fallback in the build phase which should not happen at all.
>
> So I'd appreciate if someone could help be out with this.
> I've never used CMake before.

Hi Marco,

you can change CMAKE_INSTALL_PREFIX. Everything is installed with 
this prefix. I think the default value is /usr/local.
Modules are installed by default to 
${CMAKE_INSTALL_PREFIX}/include/d, but this can be overridden by 
setting INCLUDE_INSTALL_DIR.

E.g.
cmake -DCMAKE_INSTALL_PREFIX=/usr/ldc-0.12.0 
-DINCLUDE_INSTALL_DIR=/usr/include/ldc/ldc-0.12.0 ../ldc

I hope this is helpful. Otherwise I have to have a deeper look at 
the cmake documentation.


Regards,
Kai


More information about the digitalmars-d-ldc mailing list