+# http://www.jpeg.org/jpeg2000guide/testimages/testimages.html
+
+#-----------------------------------------------------------------------------
+# Adding JPEG2000_CONFORMANCE_DATA_ROOT
+FIND_PATH(JPEG2000_CONFORMANCE_DATA_ROOT testimages.html
+ ${OPENJPEG_SOURCE_DIR}/../jpeg2000testimages
+ $ENV{JPEG2000_CONFORMANCE_DATA_ROOT}
+)
+
+#-----------------------------------------------------------------------------
+# Compiler specific flags:
+IF(CMAKE_COMPILER_IS_GNUCC)
+ # For all builds, make sure openjpeg is std99 compliant:
+ SET(CMAKE_C_FLAGS "-Wall -std=c99 ${CMAKE_C_FLAGS}")
+ # Do not use ffast-math for all build, it would produce incorrect results, only set for release:
+ SET(CMAKE_C_FLAGS_RELEASE "-ffast-math ${CMAKE_C_FLAGS_RELEASE}")
+ENDIF(CMAKE_COMPILER_IS_GNUCC)