tesseract-ocr / tesseract

Tesseract Open Source OCR Engine (main repository)
https://tesseract-ocr.github.io/
Apache License 2.0
59.53k stars 9.23k forks source link

Make regular usage of CMAKE_INSTALL_LIBDIR and GNUInstallDirs #4272

Closed Zopolis4 closed 2 weeks ago

Zopolis4 commented 2 weeks ago

Use CMake's logic to define CMAKE_INSTALL_LIBDIR rather than relying on a user override, and make use of the additional abstraction that the GNUInstallDirs module allows.

zdenop commented 2 weeks ago

What is a benefit of this? Especially for non GNU installation like Windows?

Zopolis4 commented 2 weeks ago

This doesn't affect a windows installation, as it only modifies unix installation code.

zdenop commented 2 weeks ago

But what it the benefit of this PR? What kind of problem are you solving?

Zopolis4 commented 2 weeks ago

Avoiding the need to manually define CMAKE_INSTALL_LIBDIR as lib64 on systems where this is the default value.

egorpugin commented 2 weeks ago

Maybe change the default to lib64? What are systems with lib today?

stweil commented 2 weeks ago

Maybe change the default to lib64? What are systems with lib today?

Linux installations for i686, older Raspberry PI distributions, other 32 bit embedded systems don't have lib64 as far as I know.

Zopolis4 commented 2 weeks ago

Not all distros use lib64-- using GNUInstallDirs ensures that tesseract will match whatever is the default for that platform.

zdenop commented 2 weeks ago

I checked openSUSE and it use booth (lib & lib64)

zdenop commented 2 weeks ago

I make basic build&install test on Windows and openSUSE and I do not see problem with this PR.