Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libjpeg-turbo] usage instructions should be corrected #43103

Open
FrobtheBuilder opened this issue Jan 5, 2025 · 1 comment · May be fixed by #43105
Open

[libjpeg-turbo] usage instructions should be corrected #43103

FrobtheBuilder opened this issue Jan 5, 2025 · 1 comment · May be fixed by #43105
Assignees
Labels
category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist

Comments

@FrobtheBuilder
Copy link

Is your feature request related to a problem? Please describe.

If you install libjpeg-turbo and use it to load an image with boost-gil, following the usage instructions shown upon cmake generation will result in tons of compile errors with missing libjpeg symbols as it instructs you:

libjpeg-turbo is compatible with built-in implementation-agnostic CMake targets:

    find_package(JPEG REQUIRED)
    target_include_directories(main PRIVATE JPEG::JPEG)

When actually, the jpeg.lib library itself will not be linked unless you instead use

target_link_libraries(main PRIVATE JPEG::JPEG)

If you link it that way, everything works fine. Unless I'm missing something, this looks like some sort of oversight.

Proposed solution

Update the usage instructions on libjpeg-turbo (this file here) to recommend target_link_libraries, which works, instead of target_include_directories, which does not work.

I will do it myself if I can get confirmation that this is in fact the problem and proper solution. It appears that way to me, but I'm not exactly a cmake expert so I thought I should clarify first.

Describe alternatives you've considered

No response

Additional context

No response

@FrobtheBuilder FrobtheBuilder added the category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist label Jan 5, 2025
@dg0yt
Copy link
Contributor

dg0yt commented Jan 5, 2025

This is an error in the usage hint. target_link_libraries is the command to be used. I will fix it.

@dg0yt dg0yt linked a pull request Jan 5, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants