openstreetmap / merkaartor

Home of Merkaartor, an openstreetmap mapping program.
http://merkaartor.be/
Other
298 stars 78 forks source link

Use CMAKE_INSTALL_LIBDIR for library installation path #291

Open eclipseo opened 11 months ago

eclipseo commented 11 months ago

Warning: only tested on Linux.

We need to be able to use path other than /usr/lib. RPM based distro generally /usr/lib64, and Debian based do their thing too. Using GNUInstallDirs allow determining the correct path.

Krakonos commented 7 months ago

Doesn't compile on Windows. It may have issues on OSX, but I didn't test. I suggest wrapping this into:

 if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")

(note that if (UNIX) is probably not applicable here since it forces GNU paths into BSD-like systems. Not that it's a big concern, since I'm not aware of anybody actually using it on a BSD except for OSX.

eclipseo commented 5 months ago

Test build: https://copr.fedorainfracloud.org/coprs/eclipseo/exiv2-0.28.2/build/7493845/