2011-07-21 17:23:31 +02:00
CMAKE_MINIMUM_REQUIRED ( VERSION 2.6 )
INCLUDE_DIRECTORIES ( ${ OPENJPEG_SOURCE_DIR } /libopenjpeg
$ { 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
2011-07-22 16:26:57 +02:00
$ { 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:
SET ( comparePGXimages_SRCS comparePGXimages.c ${ OPENJPEG_SOURCE_DIR } /applications/codec/convert.c )
2011-07-25 18:33:52 +02:00
SET ( compare_dump_files_SRCS compare_dump_files.c )
2011-07-21 17:23:31 +02:00
# If not getopt was found then add it to the exe:
IF ( DONT_HAVE_GETOPT )
message ( "dont have getopt, we will add it" )
2011-07-21 18:26:23 +02:00
SET ( comparePGXimages_SRCS
$ { c o m p a r e P G X i m a g e s _ S R C S }
2011-07-21 17:23:31 +02:00
$ { 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 / g e t o p t . c
)
2011-07-25 18:33:52 +02:00
SET ( compare_dump_files_SRCS
$ { c o m p a r e _ d u m p _ f i l e s _ S R C S }
$ { 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 / g e t o p t . c
)
2011-07-21 17:23:31 +02:00
ENDIF ( DONT_HAVE_GETOPT )
ADD_EXECUTABLE ( comparePGXimages ${ comparePGXimages_SRCS } )
TARGET_LINK_LIBRARIES ( comparePGXimages ${ OPENJPEG_LIBRARY_NAME }
2011-07-22 16:26:57 +02:00
$ { Z _ L I B 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 }
)
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
# 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-07-27 14:45:04 +02:00
ADD_SUBDIRECTORY ( nonregression )