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()
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
@Neumann-A We already do that. See https://github.com/microsoft/vcpkg/blob/master/ports/libjpeg-turbo/vcpkg-cmake-wrapper.cmake
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.
Most helpful comment
That is not enough. You have to do a
find_librarycall forJPEG_LIBRARY_RELEASEandJPEG_LIBRARY_DEBUGbefore the find_package call and make sure that those variables are correctly set. The point of the current wrapper is just to add the targetJPEG::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.