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.81k stars 393 forks source link

Autotools build installs broken CMake configuration files #757

Closed cho-m closed 4 weeks ago

cho-m commented 1 month ago

The autotools build has been installing broken CMake files as it currently cannot substitute all the variables nor generate a LeptonicaTargets.cmake file. For example, LeptonicaConfig.cmake getting installed with:

if (@OPENJPEG_SUPPORT@)
    find_dependency(OpenJPEG CONFIG)
endif()
if (@LIBWEBP_SUPPORT@)
    find_dependency(WebP @MINIMUM_WEBPMUX_VERSION@ CONFIG)
endif()

include(${CMAKE_CURRENT_LIST_DIR}/LeptonicaTargets.cmake)

...

SET(Leptonica_VERSION           @leptonica_VERSION@)
SET(Leptonica_VERSION_MAJOR     @leptonica_VERSION_MAJOR@)
SET(Leptonica_VERSION_MINOR     @leptonica_VERSION_MINOR@)
SET(Leptonica_VERSION_PATCH     @leptonica_VERSION_PATCH@)

May just remove these files from Autotools build if they aren't supported.

https://github.com/DanBloomberg/leptonica/blob/96a3d7451e7d717d8a0c88436f5ff7ea7129412e/configure.ac#L270-L271

https://github.com/DanBloomberg/leptonica/blob/96a3d7451e7d717d8a0c88436f5ff7ea7129412e/Makefile.am#L10-L12