fixed a segfault with fgets return value for some cases inside test function compare_...
[openjpeg.git] / tests / CMakeLists.txt
index 858befb4a1a6334812918ee4c9fde8c24a71fe15..972e9e99c5da1e6ae2d47097acda0d1d85c8aa9d 100644 (file)
@@ -3,11 +3,18 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
 INCLUDE_DIRECTORIES(${OPENJPEG_SOURCE_DIR}/libopenjpeg
                     ${OPENJPEG_SOURCE_DIR}/applications/codec
                     ${OPENJPEG_SOURCE_DIR}/applications/common
+                    ${Z_INCLUDE_DIRNAME}
+                    ${PNG_INCLUDE_DIRNAME}
+                    ${TIFF_INCLUDE_DIRNAME}
                     )
 
 # First thing define the common source:
 SET(comparePGXimages_SRCS comparePGXimages.c ${OPENJPEG_SOURCE_DIR}/applications/codec/convert.c)
 
+SET(compare_dump_files_SRCS compare_dump_files.c)
+
+SET(compareRAWimages_SRCS compareRAWimages.c)
+
 # If not getopt was found then add it to the exe:
 IF(DONT_HAVE_GETOPT)
   message("dont have getopt, we will add it")
@@ -15,13 +22,28 @@ IF(DONT_HAVE_GETOPT)
     ${comparePGXimages_SRCS}
     ${OPENJPEG_SOURCE_DIR}/applications/common/getopt.c
   )
+  
+  SET(compare_dump_files_SRCS
+    ${compare_dump_files_SRCS}
+    ${OPENJPEG_SOURCE_DIR}/applications/common/getopt.c
+  )
+  
+  SET(compareRAWimages_SRCS
+    ${compareRAWimages_SRCS}
+    ${OPENJPEG_SOURCE_DIR}/applications/common/getopt.c
+  )
 ENDIF(DONT_HAVE_GETOPT)
 
 ADD_EXECUTABLE(comparePGXimages ${comparePGXimages_SRCS})
 TARGET_LINK_LIBRARIES(comparePGXimages ${OPENJPEG_LIBRARY_NAME}
-                                        ${PNG_LIBNAME}
-                                        ${TIFF_LIBNAME}
-                                        )
+                                       ${Z_LIBNAME}
+                                       ${PNG_LIBNAME}
+                                       ${TIFF_LIBNAME}
+                                       )
+                                       
+ADD_EXECUTABLE(compare_dump_files ${compare_dump_files_SRCS})
+
+ADD_EXECUTABLE(compareRAWimages ${compareRAWimages_SRCS})
 
 # No image send to the dashboard if lib PNG is not available.
 IF(NOT HAVE_LIBPNG)
@@ -29,3 +51,4 @@ IF(NOT HAVE_LIBPNG)
 ENDIF(NOT HAVE_LIBPNG)
 
 ADD_SUBDIRECTORY(conformance)
+ADD_SUBDIRECTORY(nonregression)
\ No newline at end of file