[graf2d] Make libgif a builtin obtained from the web and remove the vendored code#21578
[graf2d] Make libgif a builtin obtained from the web and remove the vendored code#21578dpiparo merged 4 commits intoroot-project:masterfrom
Conversation
| +cmake_minimum_required(VERSION 3.23) | ||
| +project(LibUngif VERSION 1.0) # The version does not matter here | ||
| + | ||
| +add_library(gif-static |
There was a problem hiding this comment.
I would be explicit here, making it a static library:
- +add_library(gif-static
+ +add_library(gif-static STATICOtherwise, you might get surprises based on:
If no
<type>is given the default is STATIC or SHARED based on the value of the BUILD_SHARED_LIBS variable.
| --- /dev/null 2026-03-12 08:23:04 | ||
| +++ CMakeLists.txt 2026-03-12 08:20:11 | ||
| @@ -0,0 +1,29 @@ | ||
| +cmake_minimum_required(VERSION 3.23) |
There was a problem hiding this comment.
This CMake version was discouraged here: #19941
@guitargeek mentioned:
but maybe at some point we should discuss if we should keep it like that when Ubuntu doesn't update it's CMake version in 5 years at all. Even RedHat does that.
From my point of view, (I am still using Ubuntu22), I think it's no problem at all to install from the official CMake PPA or snap rather than from the outdated APT package. Ubu22 users building themselves won't lose more than 2 minutes with this.
On the other hand, ROOT 6.42 will start more or less at the same time than Ubu22 is EOL, so maybe in a couple of months this can be done already in the master branch?
| /* Define if using builtin libungif */ | ||
| #define HAVE_BUILTIN_UNGIF 1 |
There was a problem hiding this comment.
| /* Define if using builtin libungif */ | |
| #define HAVE_BUILTIN_UNGIF 1 |
Test Results 22 files 22 suites 3d 4h 9m 26s ⏱️ Results for commit 3ba4129. ♻️ This comment has been updated with latest results. |
As of version 5.2.2, the sources need to be patched to create a CMakeLists for the library itself. After that, the builtin can be treated as libpng and libjpeg.
85fa5c5 to
d673de9
Compare
There was a problem hiding this comment.
| target_link_libraries(${LIB_NAME} PRIVATE ${JPEG_LIBRARY_LOCATION} ${PNG_LIBRARY_LOCATION} ${GIF_LIBRARY_LOCATION}) |
There was a problem hiding this comment.
addressed in the last push
There was a problem hiding this comment.
| INCLUDE_DIRECTORIES(${FREETYPE_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} ${JPEG_INCLUDE_DIR} ${PNG_INCLUDE_DIR} ${GIF_INCLUDE_DIR}) |
There was a problem hiding this comment.
addressed in the last push
Both on Windows and macOS/Linux. This is necessary not to have subtle misconfigurations when dealing with parallelised builds.
This PR is analogous to #21556 , but for libgif.