cairo/test/pdiff/CMakeLists.txt
Carl Worth 812fd53499 Add perceptualdiff program totest/pdiff.
The perceptualdiff program was written by Hector Yee with contributions
from Scott Corley and Mick Weiss. It is hosted at http://pdiff.sourceforge.net
The source code added here was obtained by:

	svn co https://svn.sourceforge.net/svnroot/pdiff/trunk pdiff

which gave revision 22 of the source code.

The perceptualdiff program is available under the terms of the GNU GPL,
so I've added a note to COPYING about this program, (and the fact that
it is auxiliary only, and does not affect the license of the implementation
of cairo itself).
2006-11-29 22:40:28 -08:00

55 lines
No EOL
1.1 KiB
CMake

PROJECT (PerceptualDiff)
SET(DIFF_SRC PerceptualDiff.cpp LPyramid.cpp RGBAImage.cpp
CompareArgs.cpp Metric.cpp)
ADD_EXECUTABLE (perceptualdiff ${DIFF_SRC})
# look for libtiff
FIND_PATH(TIFF_INCLUDE_DIR tiff.h
/usr/local/include
/usr/include
/opt/local/include
)
FIND_LIBRARY(TIFF_LIBRARY tiff
/usr/lib
/usr/local/lib
/opt/local/lib
)
IF(TIFF_INCLUDE_DIR)
IF(TIFF_LIBRARY)
SET( TIFF_FOUND "YES" )
SET( TIFF_LIBRARIES ${TIFF_LIBRARY} )
ENDIF(TIFF_LIBRARY)
ENDIF(TIFF_INCLUDE_DIR)
IF(TIFF_FOUND)
INCLUDE_DIRECTORIES(${TIFF_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(perceptualdiff ${TIFF_LIBRARY})
ENDIF(TIFF_FOUND)
# look for libpng
FIND_PATH(PNG_INCLUDE_DIR png.h
/usr/local/include
/usr/include
/opt/local/include
)
FIND_LIBRARY(PNG_LIBRARY png
/usr/lib
/usr/local/lib
/opt/local/lib
)
IF(PNG_INCLUDE_DIR)
IF(PNG_LIBRARY)
SET( PNG_FOUND "YES" )
SET( PNG_LIBRARIES ${PNG_LIBRARY} )
ENDIF(PNG_LIBRARY)
ENDIF(PNG_INCLUDE_DIR)
IF(PNG_FOUND)
INCLUDE_DIRECTORIES(${PNG_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(perceptualdiff ${PNG_LIBRARY})
ENDIF(PNG_FOUND)