[CMake] GNUInstallDirs on Fedora problem
Nils Gladitz
nilsgladitz at gmail.com
Thu Sep 4 16:44:33 EDT 2014
On 04.09.2014 21:50, Richard Shaw wrote:
> I'm hoping I'm just missing something really obvious but I recently
> discovered the module GNUInstallDirs which is great. But I just tried
> converting over to it on one of my projects and although my system is
> definitely x86_64 the libraries are getting installed to lib not lib64.
>
> I looked through the source and it seems the CMAKE_SIZEOF_VOID_P is
> being used to make the determination.
>
> I added a debug message to my project for CMAKE_SIZEOF_VOID_P and it
> shows nothing, but per the module if it's not defined then it should
> show me a warning, however if I try:
>
> $ cmake --system-information | grep SIZEOF_VOID_P
> CMAKE_SIZEOF_VOID_P "8"
>
> I get the right answer, but it's still installing to lib not lib64...
>
> Any ideas?
Are you including the module before your first project() call?
project() sets up compilers and among other things runs the compile test
that determines and sets CMAKE_SIZEOF_VOID_P.
Nils
More information about the CMake
mailing list