fixed segfault with 123.j2c and bug.j2c images (thanks to Tim Mattox for his contribu...
[openjpeg.git] / tests / CMakeLists.txt
1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
2
3 INCLUDE_DIRECTORIES(${OPENJPEG_SOURCE_DIR}/libopenjpeg
4                     ${OPENJPEG_SOURCE_DIR}/applications/codec
5                     ${OPENJPEG_SOURCE_DIR}/applications/common
6                     ${Z_INCLUDE_DIRNAME}
7                     ${PNG_INCLUDE_DIRNAME}
8                     ${TIFF_INCLUDE_DIRNAME}
9                     )
10
11 # First thing define the common source:
12 SET(comparePGXimages_SRCS comparePGXimages.c ${OPENJPEG_SOURCE_DIR}/applications/codec/convert.c)
13
14 SET(compare_dump_files_SRCS compare_dump_files.c)
15
16 # If not getopt was found then add it to the exe:
17 IF(DONT_HAVE_GETOPT)
18   message("dont have getopt, we will add it")
19   SET(comparePGXimages_SRCS
20     ${comparePGXimages_SRCS}
21     ${OPENJPEG_SOURCE_DIR}/applications/common/getopt.c
22   )
23   
24   SET(compare_dump_files_SRCS
25     ${compare_dump_files_SRCS}
26     ${OPENJPEG_SOURCE_DIR}/applications/common/getopt.c
27   )
28 ENDIF(DONT_HAVE_GETOPT)
29
30 ADD_EXECUTABLE(comparePGXimages ${comparePGXimages_SRCS})
31 TARGET_LINK_LIBRARIES(comparePGXimages ${OPENJPEG_LIBRARY_NAME}
32                                        ${Z_LIBNAME}
33                                        ${PNG_LIBNAME}
34                                        ${TIFF_LIBNAME}
35                                        )
36                                        
37 ADD_EXECUTABLE(compare_dump_files ${compare_dump_files_SRCS})
38
39 # No image send to the dashboard if lib PNG is not available.
40 IF(NOT HAVE_LIBPNG)
41   MESSAGE(WARNING "Lib PNG seems to be not available: if you want run the non-regression tests with images reported to the dashboard, you need it (try BUILD_THIRDPARTY)") 
42 ENDIF(NOT HAVE_LIBPNG)
43
44 ADD_SUBDIRECTORY(conformance)
45 ADD_SUBDIRECTORY(nonregression)