FindCImg.cmake: Propagate png and jpeg library paths properly by arrowd · Pull Request #328 · linuxdeploy/linuxdeploy · GitHub
Skip to content

FindCImg.cmake: Propagate png and jpeg library paths properly#328

Merged
TheAssassin merged 1 commit into
linuxdeploy:masterfrom
arrowd:cimg-cmake
Apr 21, 2026
Merged

FindCImg.cmake: Propagate png and jpeg library paths properly#328
TheAssassin merged 1 commit into
linuxdeploy:masterfrom
arrowd:cimg-cmake

Conversation

@arrowd

@arrowd arrowd commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

According to FindPkgConfig documentation, the ${prefix}_LINK_LIBRARIES expands to a full path to the library. This is what we want to pass to target_link_libraries() later, because this allows CMake to properly generate -L and -l flags. Using just ${prefix}_LIBRARIES works on Linux, where libraries are put in the default library search path, but fails on FreeBSD.

This change does not fix the case for STATIC_BUILD due to bug on the CMake side: Kitware/CMake@7e4adca

According to FindPkgConfig documentation, the ${prefix}_LINK_LIBRARIES expands
to a full path to the library. This is what we want to pass to
target_link_libraries() later, because this allows CMake to properly generate
-L and -l flags. Using just ${prefix}_LIBRARIES works on Linux, where libraries
are put in the default library search path, but fails on FreeBSD.

This change does not fix the case for STATIC_BUILD due to bug on the CMake side:
Kitware/CMake@7e4adca

@TheAssassin TheAssassin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Let's see if CI agrees. Thanks!

@TheAssassin TheAssassin enabled auto-merge (rebase) April 21, 2026 23:12
@TheAssassin TheAssassin merged commit 33d18db into linuxdeploy:master Apr 21, 2026
5 of 6 checks passed
@TheAssassin

Copy link
Copy Markdown
Member

@arrowd

arrowd commented Apr 22, 2026

Copy link
Copy Markdown
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants