You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tiff - Automatically download/build liblerc dependency if missing during build #8
Title: Automatically download/build liblerc dependency if missing during build
Problem
libtiff includes support for [LERC](https://github.com/Esri/lerc) compression. However, if liblerc (or Lerc.dll / libLerc.so) is not installed on the host system, the build process fails or fails to link properly.
Manually downloading and building liblerc as a prerequisite introduces extra setup overhead for automated build pipelines and CI workflows.
Proposed Solution
Add an automated fallback mechanism in the CMake build system to automatically fetch and compile liblerc if it is not detected on the system.
This can be achieved via CMake's FetchContent module:
# Check for system LERC library firstfind_package(LERCQUIET)
if(NOT LERC_FOUND)
message(STATUS"LERC dynamic library not found locally. Fetching and building automatically...")
include(FetchContent)
FetchContent_Declare(
lerc
GIT_REPOSITORY https://github.com/Esri/lerc.git
GIT_TAG v4.0.0 # Or appropriate release tag
)
FetchContent_MakeAvailable(lerc)
endif()
Benefits
Simplifies automated CI/CD build scripts by removing the need to pre-install liblerc.
Ensures seamless builds across environments without requiring manual dependency management.
Activity