Vcpkg: [libjpeg-turbo] Requires debug postfix d on linux

Created on 28 May 2019  路  4Comments  路  Source: microsoft/vcpkg

From CMake FindJPEG.cmake:

set(jpeg_names ${JPEG_NAMES} jpeg jpeg-static libjpeg libjpeg-static)
foreach(name ${jpeg_names})
  list(APPEND jpeg_names_debug "${name}d")
endforeach()
port-bug upstream-changes

Most helpful comment

That is not enough. You have to do a find_library call for JPEG_LIBRARY_RELEASE and JPEG_LIBRARY_DEBUG before the find_package call and make sure that those variables are correctly set. The point of the current wrapper is just to add the target JPEG::JPEG.
But the current wrapper is just a copy of a newer findJPEG within cmake another example why vcpkg should have FindModules instead of the wrappers.

All 4 comments

The upstream should support it.

for the time vcpkg should install a vcpkg_cmake_wrapper to make sure that the right libraries are always found

That is not enough. You have to do a find_library call for JPEG_LIBRARY_RELEASE and JPEG_LIBRARY_DEBUG before the find_package call and make sure that those variables are correctly set. The point of the current wrapper is just to add the target JPEG::JPEG.
But the current wrapper is just a copy of a newer findJPEG within cmake another example why vcpkg should have FindModules instead of the wrappers.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

spindensity picture spindensity  路  3Comments

jack17529 picture jack17529  路  3Comments

cskrisz picture cskrisz  路  3Comments

ghost picture ghost  路  3Comments

madkoala picture madkoala  路  3Comments