openjpeg/tests/CMakeLists.txt

59 lines
2.1 KiB
CMake
Raw Normal View History

2011-12-21 11:19:36 +01:00
# Tests
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:
2011-12-21 11:19:36 +01:00
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 USE_SYSTEM_GETOPT)
list(APPEND comparePGXimages_SRCS ${OPENJPEG_SOURCE_DIR}/applications/common/opj_getopt.c)
list(APPEND compare_dump_files_SRCS ${OPENJPEG_SOURCE_DIR}/applications/common/opj_getopt.c)
list(APPEND compareRAWimages_SRCS ${OPENJPEG_SOURCE_DIR}/applications/common/opj_getopt.c)
endif()
ADD_EXECUTABLE(comparePGXimages ${comparePGXimages_SRCS})
2011-12-21 11:19:36 +01:00
TARGET_LINK_LIBRARIES(comparePGXimages
2011-12-21 16:21:53 +01:00
${OPENJPEG_LIBRARY_NAME}
${PNG_LIBNAME} ${TIFF_LIBNAME}
)
# 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)
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)
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)
ADD_SUBDIRECTORY(conformance)
ADD_SUBDIRECTORY(nonregression)
2012-04-06 15:07:01 +02:00
ADD_SUBDIRECTORY(unit)
2011-12-27 19:00:04 +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(NAME TestJPIP1 COMMAND ${CMAKE_COMMAND} -DD_URL:STRING=${s} -DD_FILE:PATH=${p}
2011-12-27 19:00:04 +01:00
-DEXPECTED_MD5=${md5} -P ${PROJECT_SOURCE_DIR}/CMake/JPIPTestDriver.cmake)
ENDIF(JPIP_SERVER)
ENDIF(BUILD_JPIP)