[trunk] search for kdu_expand in a more cmake-compliant way
This commit is contained in:
parent
769982d058
commit
27ba604ad7
|
@ -219,10 +219,15 @@ IF(BUILD_TESTING)
|
||||||
$ENV{OPJ_DATA_ROOT}
|
$ENV{OPJ_DATA_ROOT}
|
||||||
${CMAKE_SOURCE_DIR}/../data
|
${CMAKE_SOURCE_DIR}/../data
|
||||||
)
|
)
|
||||||
|
|
||||||
# For encoding tests we need the path to the ref decoder exe/lib (kakadu)
|
# For encoding tests we need the path to the ref decoder exe/lib (kakadu)
|
||||||
SET (REF_DECODER_BIN_PATH "NOTFOUND" CACHE PATH "Single directory where find the reference decoder binaries to enable encoding test suite.")
|
FIND_PROGRAM(REF_DECODER_BIN
|
||||||
MARK_AS_ADVANCED(REF_DECODER_BIN_PATH)
|
NAMES kdu_expand
|
||||||
|
DOC "Kakadu kdu_expand program used in encoder non-regression testing")
|
||||||
|
IF(REF_DECODER_BIN)
|
||||||
|
GET_FILENAME_COMPONENT(REF_DECODER_BIN_PATH ${REF_DECODER_BIN} PATH CACHE)
|
||||||
|
MARK_AS_ADVANCED(REF_DECODER_BIN_PATH)
|
||||||
|
ENDIF(REF_DECODER_BIN)
|
||||||
|
|
||||||
# Add repository where to find tests
|
# Add repository where to find tests
|
||||||
ADD_SUBDIRECTORY(tests)
|
ADD_SUBDIRECTORY(tests)
|
||||||
|
|
|
@ -17,11 +17,10 @@ CONFIGURE_FILE("opj_ref_decode_cmd.sh.in"
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/opj_ref_decode_cmd.sh"
|
"${CMAKE_CURRENT_BINARY_DIR}/opj_ref_decode_cmd.sh"
|
||||||
@ONLY)
|
@ONLY)
|
||||||
ENDIF (NOT WIN32)
|
ENDIF (NOT WIN32)
|
||||||
|
|
||||||
STRING(COMPARE EQUAL ${REF_DECODER_BIN_PATH} "NOTFOUND" REF_DECODER_NOTFOUND)
|
IF (NOT REF_DECODER_BIN_PATH)
|
||||||
IF (REF_DECODER_NOTFOUND)
|
MESSAGE(STATUS "REF_DECODER_BIN_PATH not set, if you want all the encoding tests suite provide the path to kdu_expand")
|
||||||
MESSAGE(STATUS "REF_DECODER_BIN_PATH not found, if you want all the encoding tests suite please provide a regular path")
|
ENDIF (NOT REF_DECODER_BIN_PATH)
|
||||||
ENDIF (REF_DECODER_NOTFOUND)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue