Files
CMake/Tests/FindJPEG/Test/main.c
T
Ben Boeckel 1c4c4be509 FindJPEG: handle multiarch installs of libjpeg-turbo
Fedora installs a `jconfig-32.h` and `jconfig-64.h` which were not
searched. Instead, glob up all `jconfig` headers and bail once we've
found a version number.
2018-11-06 16:45:52 -05:00

17 lines
393 B
C

#include <assert.h>
#include <stdio.h>
#include <jpeglib.h>
int main()
{
/* Without any JPEG file to open, test that the call fails as
expected. This tests that linking worked. */
struct jpeg_decompress_struct cinfo;
struct jpeg_error_mgr jerr;
cinfo.err = jpeg_std_error(&jerr);
jpeg_create_decompress(&cinfo);
return (JPEG_LIB_VERSION != CMAKE_EXPECTED_JPEG_VERSION);
}