Merge pull request #1170 from rouault/fix_color_apply_icc_profile
[openjpeg.git] / cmake / TestLargeFiles.cmake
index ffef84f5f27d728536432d3deed47667b2023315..01e4ea70f77b0d26e751226aa9a8a0e68f893e80 100644 (file)
@@ -7,7 +7,7 @@
 #  _LARGE_FILES
 #  _LARGEFILE_SOURCE
 #  _FILE_OFFSET_BITS 64
-#  HAVE_FSEEKO
+#  OPJ_HAVE_FSEEKO
 #
 #  However, it is YOUR job to make sure these defines are set in a #cmakedefine so they
 #  end up in a config.h file that is included in your source if necessary!
@@ -17,7 +17,7 @@
 #
 
 macro(OPJ_TEST_LARGE_FILES VARIABLE)
-    if("${VARIABLE}" MATCHES "^${VARIABLE}$")
+    if(NOT DEFINED ${VARIABLE})
 
         # On most platforms it is probably overkill to first test the flags for 64-bit off_t,
         # and then separately fseeko. However, in the future we might have 128-bit filesystems
@@ -113,10 +113,10 @@ macro(OPJ_TEST_LARGE_FILES VARIABLE)
         endif()
 
            if(FSEEKO_COMPILE_OK)
-                set(HAVE_FSEEKO ON CACHE INTERNAL "Result of test for fseeko/ftello")
+                set(OPJ_HAVE_FSEEKO ON CACHE INTERNAL "Result of test for fseeko/ftello")
         else()
                 message(STATUS "Checking for fseeko/ftello - not found")
-                set(HAVE_FSEEKO OFF CACHE INTERNAL "Result of test for fseeko/ftello")
+                set(OPJ_HAVE_FSEEKO OFF CACHE INTERNAL "Result of test for fseeko/ftello")
         endif()
 
            if(FILE64_OK AND FSEEKO_COMPILE_OK)