Files
CMake/Tests/FindJasper/Test/main.c
Hiroshi Miura 6e8754c625 FindJasper: Add IMPORTED target
Fixes: #20601
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2021-10-06 11:28:09 -04:00

18 lines
393 B
C

#include <assert.h>
// clang-format off
#include <stdio.h>
#include <jasper/jasper.h>
// clang-format on
int main()
{
/* Without any JPEG file to open, test that the call fails as
expected. This tests that linking worked. */
jas_init();
jas_image_t* img = jas_image_create0();
jas_image_destroy(img);
jas_cleanup();
return (JAS_VERSION != CMAKE_EXPECTED_JASPER_VERSION);
}