diff options
author | Hiroshi Miura <miurahr@linux.com> | 2021-10-06 00:39:02 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-10-06 15:28:09 (GMT) |
commit | 6e8754c6251bc2f7edfb0d71303e1b85fce93f5e (patch) | |
tree | 077977c922a7e5cf3a9473cce443777605d2fff2 /Tests/FindJasper/Test/main.c | |
parent | bdbce845cd714a1e844976e4cba4734932e89dd5 (diff) | |
download | CMake-6e8754c6251bc2f7edfb0d71303e1b85fce93f5e.zip CMake-6e8754c6251bc2f7edfb0d71303e1b85fce93f5e.tar.gz CMake-6e8754c6251bc2f7edfb0d71303e1b85fce93f5e.tar.bz2 |
FindJasper: Add IMPORTED target
Fixes: #20601
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
Diffstat (limited to 'Tests/FindJasper/Test/main.c')
-rw-r--r-- | Tests/FindJasper/Test/main.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Tests/FindJasper/Test/main.c b/Tests/FindJasper/Test/main.c new file mode 100644 index 0000000..771344d --- /dev/null +++ b/Tests/FindJasper/Test/main.c @@ -0,0 +1,17 @@ +#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); +} |