DanBloomberg / leptonica

Leptonica is an open source library containing software that is broadly useful for image processing and image analysis applications. The official github repository for Leptonica is: danbloomberg/leptonica. See leptonica.org for more documentation.
Other
1.76k stars 387 forks source link

Automake vs. CMake: mismatch in installed files #629

Closed amitdo closed 2 years ago

amitdo commented 2 years ago

DanBloomberg/leptonica@e8b670d9357c78a6

DanBloomberg/leptonica@29a33a364848f67d0

You didn't do the same for cmake/sw.

amitdo commented 2 years ago

BTW, it does not look right to me to install a file with _internal in its name.

stweil commented 2 years ago

The header files with _internal provide internal details of Leptonica structures.

Formerly those internal details were included with allheaders.h. Programs like the Tesseract training tools, but also others, could easily access member variables directly without using the available accessor functions. The drawback of that approach was that changing the internal details of Leptonica structures was difficult because it made modified versions of the Leptonica library incompatible.

Now programs which only include allheaders.h (and files included from that header file) are safe when Leptonica structures like struct Pix or struct Box are modified. They will also work with a newer Leptonica shared library Only programs which continue to use internal information by including _internal header files have a close dependency on compatible Leptonica library versions at run time.

egorpugin commented 2 years ago

Cmake (and sw) never were official build systems. People contribute their needs. They may differ from usual make behavior.

amitdo commented 2 years ago

This difference in behavior between the build systems is bad. We talked about this in the past (liblept vs. libleptonica, which Dan recently fixed).

egorpugin commented 2 years ago

I think project rules should be defined in some doc so all build systems will try to follow them:

  1. binary (lib and exe) naming
  2. .so naming
  3. header installation process
  4. else...