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 1 year ago

eclipseo commented 1 year 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 8 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 6 months ago

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