FindLibCDR.cmake revision a268eb4d3feeb31c3573681214aac856ce446227
a268eb4d3feeb31c3573681214aac856ce446227~suv# - Try to find LibCDR
a268eb4d3feeb31c3573681214aac856ce446227~suv# Once done this will define
a268eb4d3feeb31c3573681214aac856ce446227~suv#
a268eb4d3feeb31c3573681214aac856ce446227~suv# LIBCDR_FOUND - system has LibCDR
a268eb4d3feeb31c3573681214aac856ce446227~suv# LIBCDR_INCLUDE_DIRS - the LibCDR include directory
a268eb4d3feeb31c3573681214aac856ce446227~suv# LIBCDR_LIBRARIES - Link these to use LibCDR
a268eb4d3feeb31c3573681214aac856ce446227~suv# LIBCDR_DEFINITIONS - Compiler switches required for using LibCDR
a268eb4d3feeb31c3573681214aac856ce446227~suv#
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#
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~suv#
a268eb4d3feeb31c3573681214aac856ce446227~suv
a268eb4d3feeb31c3573681214aac856ce446227~suvinclude(${CMAKE_CURRENT_LIST_DIR}/../HelperMacros.cmake)
a268eb4d3feeb31c3573681214aac856ce446227~suv
a268eb4d3feeb31c3573681214aac856ce446227~suvif (LIBCDR_LIBRARIES AND LIBCDR_INCLUDE_DIRS)
a268eb4d3feeb31c3573681214aac856ce446227~suv # in cache already
a268eb4d3feeb31c3573681214aac856ce446227~suv set(LIBCDR_FOUND TRUE)
a268eb4d3feeb31c3573681214aac856ce446227~suvelse (LIBCDR_LIBRARIES AND LIBCDR_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(LIBCDR-0.1 libcdr-0.1 0 libcdr/libcdr.h libcdr-0.1 cdr-0.1)
a268eb4d3feeb31c3573681214aac856ce446227~suv if (LIBCDR-0.1_FOUND)
a268eb4d3feeb31c3573681214aac856ce446227~suv find_package(LibRevenge)
a268eb4d3feeb31c3573681214aac856ce446227~suv if (LIBREVENGE_FOUND)
a268eb4d3feeb31c3573681214aac856ce446227~suv list(APPEND LIBCDR_INCLUDE_DIRS ${LIBCDR-0.1_INCLUDE_DIRS})
a268eb4d3feeb31c3573681214aac856ce446227~suv list(APPEND LIBCDR_LIBRARIES ${LIBCDR-0.1_LIBRARIES})
a268eb4d3feeb31c3573681214aac856ce446227~suv list(APPEND LIBCDR_INCLUDE_DIRS ${LIBREVENGE_INCLUDE_DIRS})
a268eb4d3feeb31c3573681214aac856ce446227~suv list(APPEND LIBCDR_LIBRARIES ${LIBREVENGE_LIBRARIES})
a268eb4d3feeb31c3573681214aac856ce446227~suv set(LIBCDR01_FOUND TRUE)
a268eb4d3feeb31c3573681214aac856ce446227~suv endif (LIBREVENGE_FOUND)
a268eb4d3feeb31c3573681214aac856ce446227~suv else()
a268eb4d3feeb31c3573681214aac856ce446227~suv INKSCAPE_PKG_CONFIG_FIND(LIBCDR-0.0 libcdr-0.0 0 libcdr/libcdr.h libcdr-0.0 cdr-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 (LIBCDR-0.0_FOUND AND LIBWPD-STREAM-0.9_FOUND AND LIBWPD-0.9_FOUND)
a268eb4d3feeb31c3573681214aac856ce446227~suv list(APPEND LIBCDR_INCLUDE_DIRS ${LIBCDR-0.0_INCLUDE_DIRS})
a268eb4d3feeb31c3573681214aac856ce446227~suv list(APPEND LIBCDR_LIBRARIES ${LIBCDR-0.0_LIBRARIES})
a268eb4d3feeb31c3573681214aac856ce446227~suv list(APPEND LIBCDR_INCLUDE_DIRS ${LIBWPD-0.9_INCLUDE_DIRS})
a268eb4d3feeb31c3573681214aac856ce446227~suv list(APPEND LIBCDR_LIBRARIES ${LIBWPD-0.9_LIBRARIES})
a268eb4d3feeb31c3573681214aac856ce446227~suv list(APPEND LIBCDR_INCLUDE_DIRS ${LIBWPD-STREAM-0.9_INCLUDE_DIRS})
a268eb4d3feeb31c3573681214aac856ce446227~suv list(APPEND LIBCDR_LIBRARIES ${LIBWPD-STREAM-0.9_LIBRARIES})
a268eb4d3feeb31c3573681214aac856ce446227~suv set(LIBCDR00_FOUND TRUE)
a268eb4d3feeb31c3573681214aac856ce446227~suv endif (LIBCDR-0.0_FOUND AND LIBWPD-STREAM-0.9_FOUND AND LIBWPD-0.9_FOUND)
a268eb4d3feeb31c3573681214aac856ce446227~suv endif (LIBCDR-0.1_FOUND)
a268eb4d3feeb31c3573681214aac856ce446227~suv if (LIBCDR-0.1_FOUND OR LIBCDR-0.0_FOUND)
a268eb4d3feeb31c3573681214aac856ce446227~suv set(LIBCDR_FOUND TRUE)
a268eb4d3feeb31c3573681214aac856ce446227~suv endif (LIBCDR-0.1_FOUND OR LIBCDR-0.0_FOUND)
a268eb4d3feeb31c3573681214aac856ce446227~suv endif (PKG_CONFIG_FOUND)
a268eb4d3feeb31c3573681214aac856ce446227~suvendif (LIBCDR_LIBRARIES AND LIBCDR_INCLUDE_DIRS)
a268eb4d3feeb31c3573681214aac856ce446227~suv