1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
|
# - Try to find DMTX
# Once done this will define
#
# DMTX_FOUND - system has DMTX
# DMTX_INCLUDE_DIRS - the DMTX include directory
# DMTX_LIBRARIES - Link these to use DMTX
# DMTX_DEFINITIONS - Compiler switches required for using DMTX
#
# Copyright (c) 2006 Andreas Schneider <mail@cynapses.org>
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
if (DMTX_LIBRARIES AND DMTX_INCLUDE_DIRS)
# in cache already
set(DMTX_FOUND TRUE)
else (DMTX_LIBRARIES AND DMTX_INCLUDE_DIRS)
find_path(DMTX_INCLUDE_DIRS
NAMES
dmtx.h
PATHS
/usr/include
/usr/local/include
/opt/local/include
/sw/include
/usr/include/libdmtx
/usr/local/include/libdmtx
/opt/local/include/libdmtx
/sw/include/libdmtx
../../tools/libdmtx
)
# debian uses version suffixes
# add suffix evey new release
find_library(DMTX_LIBRARIES
NAMES
if (WIN32)
libdmtx
else (WIN32)
dmtx
endif (WIN32)
PATHS
/usr/lib64
/usr/lib
/usr/local/lib
/opt/local/lib
/sw/lib
../../tools/libdmtx
)
if (DMTX_INCLUDE_DIRS AND DMTX_LIBRARIES)
set(DMTX_FOUND TRUE)
endif (DMTX_INCLUDE_DIRS AND DMTX_LIBRARIES)
if (DMTX_FOUND)
if (NOT DMTX_FIND_QUIETLY)
message(STATUS "Found DMTX: ${DMTX_LIBRARIES}")
endif (NOT DMTX_FIND_QUIETLY)
else (DMTX_FOUND)
if (DMTX_FIND_REQUIRED)
message(FATAL_ERROR "Could not find DMTX")
endif (DMTX_FIND_REQUIRED)
endif (DMTX_FOUND)
# show the DMTX_INCLUDE_DIRS and DMTX_LIBRARIES variables only in the advanced view
mark_as_advanced(DMTX_INCLUDE_DIRS DMTX_LIBRARIES)
endif (DMTX_LIBRARIES AND DMTX_INCLUDE_DIRS)
|