BUG: cannot run tests if EXAMPLES are not built

This commit is contained in:
Mathieu Malaterre 2007-09-07 13:49:57 +00:00
parent 263e0f3bb2
commit 3392d99487
2 changed files with 11 additions and 10 deletions

View File

@ -102,14 +102,4 @@ FIND_PATH(JPEG2000_CONFORMANCE_DATA_ROOT testimages.html
$ENV{JPEG2000_CONFORMANCE_DATA_ROOT}
)
FILE(GLOB_RECURSE OPENJPEG_DATA_IMAGES_GLOB
"${JPEG2000_CONFORMANCE_DATA_ROOT}/*.j2k"
"${JPEG2000_CONFORMANCE_DATA_ROOT}/*.j2c"
"${JPEG2000_CONFORMANCE_DATA_ROOT}/*.jp2"
)
FOREACH(filename ${OPENJPEG_DATA_IMAGES_GLOB})
GET_FILENAME_COMPONENT(filename_temp ${filename} NAME)
ADD_TEST(j2i-${filename_temp} ${EXECUTABLE_OUTPUT_PATH}/j2k_to_image -i ${filename} -o ${filename_temp}.tif)
ENDFOREACH(filename)

View File

@ -53,4 +53,15 @@ FOREACH(exe j2k_to_image image_to_j2k)
INSTALL_TARGETS(/bin/ ${exe})
ENDFOREACH(exe)
# Do testing here, once we know the examples are being built:
FILE(GLOB_RECURSE OPENJPEG_DATA_IMAGES_GLOB
"${JPEG2000_CONFORMANCE_DATA_ROOT}/*.j2k"
"${JPEG2000_CONFORMANCE_DATA_ROOT}/*.j2c"
"${JPEG2000_CONFORMANCE_DATA_ROOT}/*.jp2"
)
FOREACH(filename ${OPENJPEG_DATA_IMAGES_GLOB})
GET_FILENAME_COMPONENT(filename_temp ${filename} NAME)
ADD_TEST(j2i-${filename_temp} ${EXECUTABLE_OUTPUT_PATH}/j2k_to_image -i ${filename} -o ${filename_temp}.tif)
ENDFOREACH(filename)