Lymphatus / caesium-image-compressor

Caesium is an image compression software that helps you store, send and share digital pictures, supporting JPG, PNG, WebP and TIFF formats. You can quickly reduce the file size (and resolution, if you want) by preserving the overall quality of the image.
https://saerasoft.com/caesium
GNU General Public License v3.0
3.56k stars 213 forks source link

build: Fix libcaesium lookup on Linux #260

Closed jtojnar closed 7 months ago

jtojnar commented 7 months ago

find_library now needs either caesium or libcaesium.so to be able to find it.

Also link the result with target_link_libraries since find_library does not register dependencies.

https://cmake.org/cmake/help/latest/command/find_library.html https://cmake.org/cmake/help/latest/variable/CMAKE_FIND_LIBRARY_PREFIXES.html

This is a follow up to 63761ac6ec778cca13b8887b6058d75dbf5644b3

jtojnar commented 7 months ago

CI failure looks unrelated.

Lymphatus commented 7 months ago

Re-runned the CI as the previous was a temporary error, but seems is failing to link the library

jtojnar commented 7 months ago

Hmm, looks like add_dependencies is not sufficient to link it. I have returned the target_link_libraries for the case we are not using system libcaesium.