From: Paul Zander <[email-masked]>

Make fits test images download optional
Make j2k test images download optional

diff --git a/src/cmake/testing.cmake b/src/cmake/testing.cmake
index b671def..ff84b7d 100644
--- a/src/cmake/testing.cmake
+++ b/src/cmake/testing.cmake
@@ -410,6 +410,10 @@ function (oiio_setup_test_data)
     oiio_get_test_data (openexr-images
                         REPO https://github.com/AcademySoftwareFoundation/openexr-images.git
                         BRANCH main)
+    if(ENABLE_FITS)
     oiio_get_test_data (fits-images)
+    endif()
+    if(ENABLE_OPENJPEG)
     oiio_get_test_data (j2kp4files_v1_5)
+    endif()
 endfunction ()