diff --git a/.gitlab/ci/configure_fedora39_makefiles.cmake b/.gitlab/ci/configure_fedora39_makefiles.cmake index 39fe6429d4..4e18c834b2 100644 --- a/.gitlab/ci/configure_fedora39_makefiles.cmake +++ b/.gitlab/ci/configure_fedora39_makefiles.cmake @@ -48,6 +48,7 @@ set(CMake_TEST_FindIconv "ON" CACHE BOOL "") set(CMake_TEST_FindICU "ON" CACHE BOOL "") set(CMake_TEST_FindImageMagick "ON" CACHE BOOL "") set(CMake_TEST_FindIntl "ON" CACHE BOOL "") +set(CMake_TEST_FindJasper "ON" CACHE BOOL "") set(CMake_TEST_FindJNI "ON" CACHE BOOL "") set(CMake_TEST_FindJPEG "ON" CACHE BOOL "") set(CMake_TEST_FindJsonCpp "ON" CACHE BOOL "") diff --git a/Tests/FindJasper/Test/CMakeLists.txt b/Tests/FindJasper/Test/CMakeLists.txt index 1e9467d49f..93873bf862 100644 --- a/Tests/FindJasper/Test/CMakeLists.txt +++ b/Tests/FindJasper/Test/CMakeLists.txt @@ -4,7 +4,7 @@ include(CTest) find_package(Jasper) -add_definitions(-DCMAKE_EXPECTED_JASPER_VERSION=${JASPER_VERSION_STRING}) +add_definitions(-DCMAKE_EXPECTED_JASPER_VERSION="${JASPER_VERSION_STRING}") add_executable(test_jasper_tgt main.c) target_link_libraries(test_jasper_tgt Jasper::Jasper) diff --git a/Tests/FindJasper/Test/main.c b/Tests/FindJasper/Test/main.c index 242ff7d63c..b9dbe1ec43 100644 --- a/Tests/FindJasper/Test/main.c +++ b/Tests/FindJasper/Test/main.c @@ -1,17 +1,11 @@ -#include -// clang-format off -#include #include -// clang-format on +#include int main(void) { - /* 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); + jas_conf_clear(); + jas_conf_set_max_mem_usage(0x100000); + jas_init_library(); + jas_cleanup_library(); + return strcmp(JAS_VERSION, CMAKE_EXPECTED_JASPER_VERSION); }