3 ${OPENJPEG_SOURCE_DIR}/libopenjpeg
4 ${OPENJPEG_SOURCE_DIR}/applications/codec
5 ${OPENJPEG_SOURCE_DIR}/applications/common
8 ${TIFF_INCLUDE_DIRNAME}
11 # First thing define the common source:
12 set(comparePGXimages_SRCS comparePGXimages.c
13 ${OPENJPEG_SOURCE_DIR}/applications/codec/convert.c
14 ${OPENJPEG_SOURCE_DIR}/applications/common/opj_getopt.c
17 set(compare_dump_files_SRCS compare_dump_files.c
18 ${OPENJPEG_SOURCE_DIR}/applications/common/opj_getopt.c)
20 set(compareRAWimages_SRCS compareRAWimages.c
21 ${OPENJPEG_SOURCE_DIR}/applications/common/opj_getopt.c)
23 add_executable(comparePGXimages ${comparePGXimages_SRCS})
24 target_link_libraries(comparePGXimages
25 ${OPENJPEG_LIBRARY_NAME}
26 ${PNG_LIBNAME} ${TIFF_LIBNAME}
28 # To support universal exe:
29 if(ZLIB_FOUND AND APPLE)
30 target_link_libraries(comparePGXimages z)
31 ELSe(ZLIB_FOUND AND APPLE)
32 target_link_libraries(comparePGXimages ${Z_LIBNAME})
35 add_executable(compare_dump_files ${compare_dump_files_SRCS})
37 add_executable(j2k_random_tile_access j2k_random_tile_access.c)
38 target_link_libraries(j2k_random_tile_access ${OPENJPEG_LIBRARY_NAME})
40 add_executable(compareRAWimages ${compareRAWimages_SRCS})
42 add_executable(test_tile_encoder test_tile_encoder.c)
43 target_link_libraries(test_tile_encoder ${OPENJPEG_LIBRARY_NAME})
45 # Let's try a couple of possibilities:
46 add_test(tte0 ${EXECUTABLE_OUTPUT_PATH}/test_tile_encoder)
47 add_test(tte1 ${EXECUTABLE_OUTPUT_PATH}/test_tile_encoder 3 2048 2048 1024 1024 8 1 tte1.j2k)
48 add_test(tte2 ${EXECUTABLE_OUTPUT_PATH}/test_tile_encoder 3 2048 2048 1024 1024 8 1 tte2.jp2)
49 add_test(tte3 ${EXECUTABLE_OUTPUT_PATH}/test_tile_encoder 1 2048 2048 1024 1024 8 1 tte3.j2k)
50 add_test(tte4 ${EXECUTABLE_OUTPUT_PATH}/test_tile_encoder 1 256 256 128 128 8 0 tte4.j2k)
51 add_test(tte5 ${EXECUTABLE_OUTPUT_PATH}/test_tile_encoder 1 512 512 256 256 8 0 tte5.j2k)
53 add_executable(test_tile_decoder test_tile_decoder.c)
54 target_link_libraries(test_tile_decoder ${OPENJPEG_LIBRARY_NAME})
56 add_test(ttd0 ${EXECUTABLE_OUTPUT_PATH}/test_tile_decoder)
57 set_property(TEST ttd0 APPEND PROPERTY DEPENDS tte0)
58 add_test(ttd1 ${EXECUTABLE_OUTPUT_PATH}/test_tile_decoder 0 0 1024 1024 tte1.j2k)
59 set_property(TEST ttd1 APPEND PROPERTY DEPENDS tte1)
60 add_test(ttd2 ${EXECUTABLE_OUTPUT_PATH}/test_tile_decoder 0 0 1024 1024 tte2.jp2)
61 set_property(TEST ttd2 APPEND PROPERTY DEPENDS tte2)
63 # No image send to the dashboard if lib PNG is not available.
65 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)")
68 add_subdirectory(conformance)
69 add_subdirectory(nonregression)
73 #set(s "http://jpip.example.com/myFCGI?target=16.jp2&fsiz=170,170&cnew=http&type=jpp-stream")
74 set(s "${JPIP_SERVER}?target=16.jp2&fsiz=170,170&cnew=http&type=jpp-stream")
75 set(p "${CMAKE_CURRENT_BINARY_DIR}/jpip.dat")
76 set(md5 "62b00c620fb0a600c5ffd413cada4674")
77 add_test(TestJPIP1 ${CMAKE_COMMAND} -DD_URL:STRING=${s} -DD_FILE:PATH=${p}
78 -DEXPECTED_MD5=${md5} -P ${PROJECT_SOURCE_DIR}/CMake/JPIPTestDriver.cmake)