2012-03-02 16:09:51 +01:00
# Tests
INCLUDE_DIRECTORIES (
$ { O P E N J P E G _ S O U R C E _ D I R } / l i b o p e n j p e g
$ { O P E N J P E G _ S O U R C E _ D I R } / a p p l i c a t i o n s / c o d e c
$ { O P E N J P E G _ S O U R C E _ D I R } / a p p l i c a t i o n s / c o m m o n
$ { Z _ I N C L U D E _ D I R N A M E }
$ { P N G _ I N C L U D E _ D I R N A M E }
$ { T I F F _ I N C L U D E _ D I R N A M E }
)
2011-07-21 17:23:31 +02:00
# First thing define the common source:
2012-03-02 16:09:51 +01:00
SET ( comparePGXimages_SRCS comparePGXimages.c
$ { O P E N J P E G _ S O U R C E _ D I R } / a p p l i c a t i o n s / c o d e c / c o n v e r t . c
$ { O P E N J P E G _ S O U R C E _ D I R } / a p p l i c a t i o n s / c o m m o n / o p j _ g e t o p t . c
)
2011-09-01 13:24:08 +02:00
2012-03-02 16:09:51 +01:00
SET ( compare_dump_files_SRCS compare_dump_files.c
$ { O P E N J P E G _ S O U R C E _ D I R } / a p p l i c a t i o n s / c o m m o n / o p j _ g e t o p t . c )
2011-09-01 13:24:08 +02:00
2012-03-02 16:09:51 +01:00
SET ( compareRAWimages_SRCS compareRAWimages.c
$ { O P E N J P E G _ S O U R C E _ D I R } / a p p l i c a t i o n s / c o m m o n / o p j _ g e t o p t . c )
2011-07-21 17:23:31 +02:00
ADD_EXECUTABLE ( comparePGXimages ${ comparePGXimages_SRCS } )
2012-03-02 16:09:51 +01:00
TARGET_LINK_LIBRARIES ( comparePGXimages
$ { O P E N J P E G _ L I B R A R Y _ N A M E }
$ { P N G _ L I B N A M E } $ { T I F F _ L I B N A M E }
)
# To support universal exe:
IF ( ZLIB_FOUND AND APPLE )
TARGET_LINK_LIBRARIES ( comparePGXimages z )
ELSe ( ZLIB_FOUND AND APPLE )
TARGET_LINK_LIBRARIES ( comparePGXimages ${ Z_LIBNAME } )
ENDIF ( ZLIB_FOUND AND APPLE )
2011-07-25 18:33:52 +02:00
ADD_EXECUTABLE ( compare_dump_files ${ compare_dump_files_SRCS } )
2011-07-21 17:23:31 +02:00
2011-11-30 17:55:25 +01:00
ADD_EXECUTABLE ( j2k_random_tile_access j2k_random_tile_access.c )
TARGET_LINK_LIBRARIES ( j2k_random_tile_access ${ OPENJPEG_LIBRARY_NAME } )
2011-08-31 15:33:40 +02:00
ADD_EXECUTABLE ( compareRAWimages ${ compareRAWimages_SRCS } )
2012-03-23 18:47:53 +01:00
ADD_EXECUTABLE ( test_tile_encoder test_tile_encoder.c )
TARGET_LINK_LIBRARIES ( test_tile_encoder ${ OPENJPEG_LIBRARY_NAME } )
2012-05-14 18:05:55 +02:00
# Let's try a couple of possibilities:
2012-05-21 10:03:58 +02:00
ADD_TEST ( tte0 ${ EXECUTABLE_OUTPUT_PATH } /test_tile_encoder )
2012-05-14 18:05:55 +02:00
ADD_TEST ( tte1 ${ EXECUTABLE_OUTPUT_PATH } /test_tile_encoder 3 2048 2048 1024 1024 8 tte1.j2k )
ADD_TEST ( tte2 ${ EXECUTABLE_OUTPUT_PATH } /test_tile_encoder 3 2048 2048 1024 1024 8 tte1.jp2 )
2012-05-14 09:03:33 +02:00
ADD_EXECUTABLE ( test_tile_decoder test_tile_decoder.c )
TARGET_LINK_LIBRARIES ( test_tile_decoder ${ OPENJPEG_LIBRARY_NAME } )
2012-05-21 10:05:29 +02:00
ADD_TEST ( ttd0 ${ EXECUTABLE_OUTPUT_PATH } /test_tile_decoder )
2012-05-21 10:03:58 +02:00
set_property ( TEST ttd0 APPEND PROPERTY DEPENDS tte0 )
2012-05-21 10:05:29 +02:00
ADD_TEST ( ttd1 ${ EXECUTABLE_OUTPUT_PATH } /test_tile_decoder 0 0 1024 1024 tte1.j2k )
2012-05-21 10:03:58 +02:00
set_property ( TEST ttd1 APPEND PROPERTY DEPENDS tte1 )
2012-05-21 10:05:29 +02:00
ADD_TEST ( ttd2 ${ EXECUTABLE_OUTPUT_PATH } /test_tile_decoder 0 0 1024 1024 tte1.jp2 )
2012-05-21 10:03:58 +02:00
set_property ( TEST ttd2 APPEND PROPERTY DEPENDS tte2 )
2011-07-21 17:23:31 +02:00
# No image send to the dashboard if lib PNG is not available.
IF ( NOT HAVE_LIBPNG )
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)" )
ENDIF ( NOT HAVE_LIBPNG )
2011-07-21 18:26:23 +02:00
ADD_SUBDIRECTORY ( conformance )
2011-09-01 13:24:08 +02:00
ADD_SUBDIRECTORY ( nonregression )
2012-03-02 16:09:51 +01:00
IF ( BUILD_JPIP )
IF ( JPIP_SERVER )
#SET(s "http://jpip.example.com/myFCGI?target=16.jp2&fsiz=170,170&cnew=http&type=jpp-stream")
SET ( s "${JPIP_SERVER}?target=16.jp2&fsiz=170,170&cnew=http&type=jpp-stream" )
SET ( p "${CMAKE_CURRENT_BINARY_DIR}/jpip.dat" )
SET ( md5 "62b00c620fb0a600c5ffd413cada4674" )
ADD_TEST ( TestJPIP1 ${ CMAKE_COMMAND } -DD_URL:STRING= ${ s } -DD_FILE:PATH= ${ p }
- D E X P E C T E D _ M D 5 = $ { m d 5 } - P $ { P R O J E C T _ S O U R C E _ D I R } / C M a k e / J P I P T e s t D r i v e r . c m a k e )
ENDIF ( JPIP_SERVER )
ENDIF ( BUILD_JPIP )