Fedora have dynamic libs on /usr/lib64
and /usr/lib
, for 64-bit and 32-bit libs separately; while 64-bit Debian install some 64-bit libraries on /usr/lib/x86_64-linux-gnu
, but seems some 64-bit libs are still in /usr/lib
.
This looks pretty messy. So when I write a cmake file for my project, how to decide the place for installing the compiled libs?
This is documented in GNUInstallDirs, you would typically use a variable such as CMAKE_INSTALL_LIBDIR
in your CMakeLists.txt files.