FindLibVisio.cmake revision a268eb4d3feeb31c3573681214aac856ce446227
a268eb4d3feeb31c3573681214aac856ce446227~suv# - Try to find LibVisio
a268eb4d3feeb31c3573681214aac856ce446227~suv# Once done this will define
a268eb4d3feeb31c3573681214aac856ce446227~suv# LIBVISIO_FOUND - system has LibVisio
a268eb4d3feeb31c3573681214aac856ce446227~suv# LIBVISIO_INCLUDE_DIRS - the LibVisio include directory
a268eb4d3feeb31c3573681214aac856ce446227~suv# LIBVISIO_LIBRARIES - Link these to use LibVisio
a268eb4d3feeb31c3573681214aac856ce446227~suv# LIBVISIO_DEFINITIONS - Compiler switches required for using LibVisio
a268eb4d3feeb31c3573681214aac856ce446227~suv# Copyright (c) 2008 Joshua L. Blocher <verbalshadow@gmail.com>
a268eb4d3feeb31c3573681214aac856ce446227~suv# Copyright (c) 2015 su_v <suv-sf@users.sf.net>
a268eb4d3feeb31c3573681214aac856ce446227~suv# Redistribution and use is allowed according to the terms of the New
a268eb4d3feeb31c3573681214aac856ce446227~suv# BSD license.
a268eb4d3feeb31c3573681214aac856ce446227~suv# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
a268eb4d3feeb31c3573681214aac856ce446227~suvinclude(${CMAKE_CURRENT_LIST_DIR}/../HelperMacros.cmake)
a268eb4d3feeb31c3573681214aac856ce446227~suvif (LIBVISIO_LIBRARIES AND LIBVISIO_INCLUDE_DIRS)
a268eb4d3feeb31c3573681214aac856ce446227~suv # in cache already
a268eb4d3feeb31c3573681214aac856ce446227~suv set(LIBVISIO_FOUND TRUE)
a268eb4d3feeb31c3573681214aac856ce446227~suvelse (LIBVISIO_LIBRARIES AND LIBVISIO_INCLUDE_DIRS)
a268eb4d3feeb31c3573681214aac856ce446227~suv # use pkg-config to get the directories and then use these values
a268eb4d3feeb31c3573681214aac856ce446227~suv # in the FIND_PATH() and FIND_LIBRARY() calls
a268eb4d3feeb31c3573681214aac856ce446227~suv find_package(PkgConfig)
a268eb4d3feeb31c3573681214aac856ce446227~suv if (PKG_CONFIG_FOUND)
a268eb4d3feeb31c3573681214aac856ce446227~suv INKSCAPE_PKG_CONFIG_FIND(LIBVISIO-0.1 libvisio-0.1 0 libvisio/libvisio.h libvisio-0.1 visio-0.1)
a268eb4d3feeb31c3573681214aac856ce446227~suv if (LIBVISIO-0.1_FOUND)
a268eb4d3feeb31c3573681214aac856ce446227~suv find_package(LibRevenge)
a268eb4d3feeb31c3573681214aac856ce446227~suv if (LIBREVENGE_FOUND)
a268eb4d3feeb31c3573681214aac856ce446227~suv list(APPEND LIBVISIO_INCLUDE_DIRS ${LIBVISIO-0.1_INCLUDE_DIRS})
a268eb4d3feeb31c3573681214aac856ce446227~suv list(APPEND LIBVISIO_LIBRARIES ${LIBVISIO-0.1_LIBRARIES})
a268eb4d3feeb31c3573681214aac856ce446227~suv list(APPEND LIBVISIO_INCLUDE_DIRS ${LIBREVENGE_INCLUDE_DIRS})
a268eb4d3feeb31c3573681214aac856ce446227~suv list(APPEND LIBVISIO_LIBRARIES ${LIBREVENGE_LIBRARIES})
a268eb4d3feeb31c3573681214aac856ce446227~suv set(LIBVISIO01_FOUND TRUE)
a268eb4d3feeb31c3573681214aac856ce446227~suv endif (LIBREVENGE_FOUND)
a268eb4d3feeb31c3573681214aac856ce446227~suv INKSCAPE_PKG_CONFIG_FIND(LIBVISIO-0.0 libvisio-0.0 0 libvisio/libvisio.h libvisio-0.0 visio-0.0)
a268eb4d3feeb31c3573681214aac856ce446227~suv INKSCAPE_PKG_CONFIG_FIND(LIBWPD-0.9 libwpd-0.9 0 libwpd/libwpd.h libwpd-0.9 wpd-0.9)
a268eb4d3feeb31c3573681214aac856ce446227~suv INKSCAPE_PKG_CONFIG_FIND(LIBWPD-STREAM-0.9 libwpd-stream-0.9 0 libwpd/libwpd.h libwpd-0.9 wpd-stream-0.9)
a268eb4d3feeb31c3573681214aac856ce446227~suv if (LIBVISIO-0.0_FOUND AND LIBWPD-STREAM-0.9_FOUND AND LIBWPD-0.9_FOUND)
a268eb4d3feeb31c3573681214aac856ce446227~suv list(APPEND LIBVISIO_INCLUDE_DIRS ${LIBVISIO-0.0_INCLUDE_DIRS})
a268eb4d3feeb31c3573681214aac856ce446227~suv list(APPEND LIBVISIO_LIBRARIES ${LIBVISIO-0.0_LIBRARIES})
a268eb4d3feeb31c3573681214aac856ce446227~suv list(APPEND LIBVISIO_INCLUDE_DIRS ${LIBWPD-0.9_INCLUDE_DIRS})
a268eb4d3feeb31c3573681214aac856ce446227~suv list(APPEND LIBVISIO_LIBRARIES ${LIBWPD-0.9_LIBRARIES})
a268eb4d3feeb31c3573681214aac856ce446227~suv list(APPEND LIBVISIO_INCLUDE_DIRS ${LIBWPD-STREAM-0.9_INCLUDE_DIRS})
a268eb4d3feeb31c3573681214aac856ce446227~suv list(APPEND LIBVISIO_LIBRARIES ${LIBWPD-STREAM-0.9_LIBRARIES})
a268eb4d3feeb31c3573681214aac856ce446227~suv set(LIBVISIO00_FOUND TRUE)
a268eb4d3feeb31c3573681214aac856ce446227~suv endif (LIBVISIO-0.0_FOUND AND LIBWPD-STREAM-0.9_FOUND AND LIBWPD-0.9_FOUND)
a268eb4d3feeb31c3573681214aac856ce446227~suv endif (LIBVISIO-0.1_FOUND)
a268eb4d3feeb31c3573681214aac856ce446227~suv if (LIBVISIO-0.1_FOUND OR LIBVISIO-0.0_FOUND)
a268eb4d3feeb31c3573681214aac856ce446227~suv set(LIBVISIO_FOUND TRUE)
a268eb4d3feeb31c3573681214aac856ce446227~suv endif (LIBVISIO-0.1_FOUND OR LIBVISIO-0.0_FOUND)
a268eb4d3feeb31c3573681214aac856ce446227~suv endif (PKG_CONFIG_FOUND)
a268eb4d3feeb31c3573681214aac856ce446227~suvendif (LIBVISIO_LIBRARIES AND LIBVISIO_INCLUDE_DIRS)