Commit 3b4c7c84 authored by Marc Jeanmougin's avatar Marc Jeanmougin 🔧 Committed by Marc Jeanmougin
Browse files

Siplify dependency checks:

    - lcms2 made a mandatory dep
    - librevenge has been common for years, dropped checks for its use with libwpg, libvisio and libcdr
    - checks for very old versions of libwpg, libvisio, libcdr removed
    - gc, readline, and lcms2, are detected with pkg-config
    - iconv, intl detected with cmake system
parent 7c6e572e
Pipeline #212192148 failed with stages
in 51 minutes and 22 seconds
......@@ -115,7 +115,13 @@ pkg_check_modules(INKSCAPE_DEP REQUIRED
fontconfig
gsl
gmodule-2.0
libsoup-2.4>=2.42)
libsoup-2.4>=2.42
#double-conversion
bdw-gc #boehm-demers-weiser gc
lcms2)
# remove this line and uncomment the doiuble-conversion above when double-conversion.pc file gets shipped on all platforms we support
find_package(DoubleConversion REQUIRED) # lib2geom dependency
sanitize_ldflags_for_libs(INKSCAPE_DEP_LDFLAGS)
list(APPEND INKSCAPE_LIBS ${INKSCAPE_DEP_LDFLAGS})
......@@ -123,8 +129,6 @@ list(APPEND INKSCAPE_INCS_SYS ${INKSCAPE_DEP_INCLUDE_DIRS})
add_definitions(${INKSCAPE_DEP_CFLAGS_OTHER})
find_package(DoubleConversion REQUIRED) # lib2geom dependency
if(WITH_JEMALLOC)
find_package(JeMalloc)
if (JEMALLOC_FOUND)
......@@ -134,34 +138,15 @@ if(WITH_JEMALLOC)
endif()
endif()
if(ENABLE_LCMS)
unset(HAVE_LIBLCMS2)
find_package(LCMS2)
if(LCMS2_FOUND)
list(APPEND INKSCAPE_INCS_SYS ${LCMS2_INCLUDE_DIRS})
list(APPEND INKSCAPE_LIBS ${LCMS2_LIBRARIES})
add_definitions(${LCMS2_DEFINITIONS})
set (HAVE_LIBLCMS2 ON)
else()
set(ENABLE_LCMS OFF)
endif()
endif()
find_package(Iconv REQUIRED)
list(APPEND INKSCAPE_INCS_SYS ${ICONV_INCLUDE_DIRS})
list(APPEND INKSCAPE_LIBS ${ICONV_LIBRARIES})
add_definitions(${ICONV_DEFINITIONS})
list(APPEND INKSCAPE_INCS_SYS ${Iconv_INCLUDE_DIRS})
list(APPEND INKSCAPE_LIBS ${Iconv_LIBRARIES})
find_package(Intl REQUIRED)
list(APPEND INKSCAPE_INCS_SYS ${Intl_INCLUDE_DIRS})
list(APPEND INKSCAPE_LIBS ${Intl_LIBRARIES})
add_definitions(${Intl_DEFINITIONS})
find_package(BoehmGC REQUIRED)
list(APPEND INKSCAPE_INCS_SYS ${BOEHMGC_INCLUDE_DIRS})
list(APPEND INKSCAPE_LIBS ${BOEHMGC_LIBRARIES})
add_definitions(${BOEHMGC_DEFINITIONS})
# Check for system-wide version of 2geom and fallback to internal copy if not found
if(NOT WITH_INTERNAL_2GEOM)
pkg_check_modules(2Geom QUIET IMPORTED_TARGET GLOBAL 2geom>=1.0.0)
......@@ -199,12 +184,11 @@ list(APPEND INKSCAPE_LIBS ${POPPLER_LIBRARIES})
add_definitions(${POPPLER_DEFINITIONS})
if(WITH_LIBWPG)
find_package(LibWPG)
pkg_check_modules(LIBWPG libwpg-0.3 librevenge-0.0 librevenge-stream-0.0)
if(LIBWPG_FOUND)
set(WITH_LIBWPG02 ${LIBWPG-0.2_FOUND})
set(WITH_LIBWPG03 ${LIBWPG-0.3_FOUND})
sanitize_ldflags_for_libs(LIBWPG_LDFLAGS)
list(APPEND INKSCAPE_INCS_SYS ${LIBWPG_INCLUDE_DIRS})
list(APPEND INKSCAPE_LIBS ${LIBWPG_LIBRARIES})
list(APPEND INKSCAPE_LIBS ${LIBWPG_LDFLAGS})
add_definitions(${LIBWPG_DEFINITIONS})
else()
set(WITH_LIBWPG OFF)
......@@ -212,11 +196,11 @@ if(WITH_LIBWPG)
endif()
if(WITH_LIBVISIO)
find_package(LibVisio)
pkg_check_modules(LIBVISIO libvisio-0.1 librevenge-0.0 librevenge-stream-0.0)
if(LIBVISIO_FOUND)
set(WITH_LIBVISIO01 ${LIBVISIO-0.1_FOUND})
sanitize_ldflags_for_libs(LIBVISIO_LDFLAGS)
list(APPEND INKSCAPE_INCS_SYS ${LIBVISIO_INCLUDE_DIRS})
list(APPEND INKSCAPE_LIBS ${LIBVISIO_LIBRARIES})
list(APPEND INKSCAPE_LIBS ${LIBVISIO_LDFLAGS})
add_definitions(${LIBVISIO_DEFINITIONS})
else()
set(WITH_LIBVISIO OFF)
......@@ -224,11 +208,11 @@ if(WITH_LIBVISIO)
endif()
if(WITH_LIBCDR)
find_package(LibCDR)
pkg_check_modules(LIBCDR libcdr-0.1 librevenge-0.0 librevenge-stream-0.0)
if(LIBCDR_FOUND)
set(WITH_LIBCDR01 ${LIBCDR-0.1_FOUND})
sanitize_ldflags_for_libs(LIBCDR_LDFLAGS)
list(APPEND INKSCAPE_INCS_SYS ${LIBCDR_INCLUDE_DIRS})
list(APPEND INKSCAPE_LIBS ${LIBCDR_LIBRARIES})
list(APPEND INKSCAPE_LIBS ${LIBCDR_LDFLAGS})
add_definitions(${LIBCDR_DEFINITIONS})
else()
set(WITH_LIBCDR OFF)
......@@ -368,12 +352,11 @@ list(APPEND INKSCAPE_INCS_SYS ${ZLIB_INCLUDE_DIRS})
list(APPEND INKSCAPE_LIBS ${ZLIB_LIBRARIES})
if(WITH_GNU_READLINE)
find_package(Readline)
pkg_check_modules(Readline readline)
if(Readline_FOUND)
message(STATUS "Found GNU Readline: ${Readline_LIBRARY}")
add_definitions(-DWITH_GNU_READLINE)
list(APPEND INKSCAPE_INCS_SYS ${Readline_INCLUDE_DIR})
list(APPEND INKSCAPE_LIBS ${Readline_LIBRARY})
list(APPEND INKSCAPE_INCS_SYS ${Readline_INCLUDE_DIRS})
list(APPEND INKSCAPE_LIBS ${Readline_LDFLAGS})
else()
message(STATUS "Did not find GNU Readline")
set(WITH_GNU_READLINE OFF)
......
# - Try to find BoehmGC
# Once done this will define
#
# BOEHMGC_FOUND - system has BoehmGC
# BOEHMGC_INCLUDE_DIRS - the BoehmGC include directory
# BOEHMGC_LIBRARIES - Link these to use BoehmGC
# BOEHMGC_DEFINITIONS - Compiler switches required for using BoehmGC
#
# Copyright (c) 2008 Joshua L. Blocher <verbalshadow@gmail.com>
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
if (BOEHMGC_LIBRARIES AND BOEHMGC_INCLUDE_DIRS)
# in cache already
set(BOEHMGC_FOUND TRUE)
else (BOEHMGC_LIBRARIES AND BOEHMGC_INCLUDE_DIRS)
find_path(BOEHMGC_INCLUDE_DIR
NAMES
gc.h
PATHS
/usr/include
/usr/local/include
/opt/local/include
/sw/include
$ENV{DEVLIBS_PATH}/include
PATH_SUFFIXES
gc
)
find_library(GC_LIBRARY
NAMES
gc
PATHS
/usr/lib
/usr/local/lib
/opt/local/lib
/sw/lib
$ENV{DEVLIBS_PATH}/lib
)
if (GC_LIBRARY)
set(GC_FOUND TRUE)
endif (GC_LIBRARY)
set(BOEHMGC_INCLUDE_DIRS
${BOEHMGC_INCLUDE_DIR}
)
if (GC_FOUND)
set(BOEHMGC_LIBRARIES
${BOEHMGC_LIBRARIES}
${GC_LIBRARY}
)
endif (GC_FOUND)
if (BOEHMGC_INCLUDE_DIRS AND BOEHMGC_LIBRARIES)
set(BOEHMGC_FOUND TRUE)
endif (BOEHMGC_INCLUDE_DIRS AND BOEHMGC_LIBRARIES)
if (BOEHMGC_FOUND)
if (NOT BoehmGC_FIND_QUIETLY)
message(STATUS "Found BoehmGC: ${BOEHMGC_LIBRARIES}")
endif (NOT BoehmGC_FIND_QUIETLY)
else (BOEHMGC_FOUND)
if (BoehmGC_FIND_REQUIRED)
message(FATAL_ERROR "Could not find BoehmGC")
endif (BoehmGC_FIND_REQUIRED)
endif (BOEHMGC_FOUND)
# show the BOEHMGC_INCLUDE_DIRS and BOEHMGC_LIBRARIES variables only in the advanced view
mark_as_advanced(BOEHMGC_INCLUDE_DIRS BOEHMGC_LIBRARIES)
endif (BOEHMGC_LIBRARIES AND BOEHMGC_INCLUDE_DIRS)
# - Try to find Iconv
# Once done this will define
#
# ICONV_FOUND - system has Iconv
# ICONV_INCLUDE_DIR - the Iconv include directory
# ICONV_LIBRARIES - Link these to use Iconv
# ICONV_SECOND_ARGUMENT_IS_CONST - the second argument for iconv() is const
#
include(CheckCXXSourceCompiles)
IF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
# Already in cache, be silent
SET(ICONV_FIND_QUIETLY TRUE)
ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
FIND_PATH(ICONV_INCLUDE_DIR iconv.h)
FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv libiconv-2 c)
IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
SET(ICONV_FOUND TRUE)
ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR})
set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES})
IF(ICONV_FOUND)
check_cxx_source_compiles("
#include <iconv.h>
int main(){
iconv_t conv = 0;
const char* in = 0;
size_t ilen = 0;
char* out = 0;
size_t olen = 0;
iconv(conv, &in, &ilen, &out, &olen);
return 0;
}
" ICONV_SECOND_ARGUMENT_IS_CONST )
IF(ICONV_SECOND_ARGUMENT_IS_CONST)
SET(ICONV_CONST "const")
ENDIF(ICONV_SECOND_ARGUMENT_IS_CONST)
ENDIF(ICONV_FOUND)
set(CMAKE_REQUIRED_INCLUDES)
set(CMAKE_REQUIRED_LIBRARIES)
IF(ICONV_FOUND)
IF(NOT ICONV_FIND_QUIETLY)
MESSAGE(STATUS "Found Iconv: ${ICONV_LIBRARIES}")
ENDIF(NOT ICONV_FIND_QUIETLY)
ELSE(ICONV_FOUND)
IF(Iconv_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find Iconv")
ENDIF(Iconv_FIND_REQUIRED)
ENDIF(ICONV_FOUND)
MARK_AS_ADVANCED(
ICONV_INCLUDE_DIR
ICONV_LIBRARIES
ICONV_SECOND_ARGUMENT_IS_CONST
)
#.rst:
# FindIntl
# --------
#
# Find the Gettext libintl headers and libraries.
#
# This module reports information about the Gettext libintl
# installation in several variables. General variables::
#
# Intl_FOUND - true if the libintl headers and libraries were found
# Intl_INCLUDE_DIRS - the directory containing the libintl headers
# Intl_LIBRARIES - libintl libraries to be linked
#
# The following cache variables may also be set::
#
# Intl_INCLUDE_DIR - the directory containing the libintl headers
# Intl_LIBRARY - the libintl library (if any)
#
# .. note::
# On some platforms, such as Linux with GNU libc, the gettext
# functions are present in the C standard library and libintl
# is not required. ``Intl_LIBRARIES`` will be empty in this
# case.
#
# .. note::
# If you wish to use the Gettext tools (``msgmerge``,
# ``msgfmt``, etc.), use :module:`FindGettext`.
# Written by Roger Leigh <rleigh@codelibre.net>
#=============================================================================
# Copyright 2014 Roger Leigh <rleigh@codelibre.net>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
# CMake - Cross Platform Makefile Generator
# Copyright 2000-2015 Kitware, Inc.
# Copyright 2000-2011 Insight Software Consortium
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# * Neither the names of Kitware, Inc., the Insight Software Consortium,
# nor the names of their contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# ------------------------------------------------------------------------------
#
# The above copyright and license notice applies to distributions of
# CMake in source and binary form. Some source files contain additional
# notices of original copyright by their contributors; see each source
# for details. Third-party software packages supplied with CMake under
# compatible licenses provide their own copyright notices documented in
# corresponding subdirectories.
#
# ------------------------------------------------------------------------------
#
# CMake was initially developed by Kitware with the following sponsorship:
#
# * National Library of Medicine at the National Institutes of Health
# as part of the Insight Segmentation and Registration Toolkit (ITK).
#
# * US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel
# Visualization Initiative.
#
# * National Alliance for Medical Image Computing (NAMIC) is funded by the
# National Institutes of Health through the NIH Roadmap for Medical Research,
# Grant U54 EB005149.
#
# * Kitware, Inc.
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
# Find include directory
find_path(Intl_INCLUDE_DIR
NAMES "libintl.h"
DOC "libintl include directory")
mark_as_advanced(Intl_INCLUDE_DIR)
# Find all Intl libraries
find_library(Intl_LIBRARY "intl"
DOC "libintl libraries (if not in the C library)")
mark_as_advanced(Intl_LIBRARY)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Intl
FOUND_VAR Intl_FOUND
REQUIRED_VARS Intl_INCLUDE_DIR
FAIL_MESSAGE "Failed to find Gettext libintl")
if(Intl_FOUND)
set(Intl_INCLUDE_DIRS "${Intl_INCLUDE_DIR}")
if(Intl_LIBRARY)
set(Intl_LIBRARIES "${Intl_LIBRARY}")
else()
unset(Intl_LIBRARIES)
endif()
endif()
# This file was taken from the openjpeg library:
#
# http://code.google.com/p/openjpeg/source/browse/trunk/cmake/FindLCMS2.cmake?r=1987
#
# Thanks!
# - Find LCMS2 library
# Find the native LCMS2 includes and library
# Once done this will define
#
# LCMS2_INCLUDE_DIR - Where to find lcms2.h, etc.
# LCMS2_LIBRARIES - Libraries to link against to use LCMS2.
# LCMS2_FOUND - If false, do not try to use LCMS2.
#
# also defined, but not for general use are
# LCMS2_LIBRARY - Where to find the LCMS2 library.
#=============================================================================
#=============================================================================
find_path(LCMS2_INCLUDE_DIR lcms2.h PATHS /usr/include /usr/local/include /opt/include /opt/local/include)
set(LCMS2_NAMES ${LCMS2_NAMES} lcms2 liblcms2 liblcms2_static)
find_library(LCMS2_LIBRARY NAMES ${LCMS2_NAMES} )
mark_as_advanced(LCMS2_INCLUDE_DIR LCMS2_LIBRARY)
# handle the QUIETLY and REQUIRED arguments and set LCMS2_FOUND to TRUE if
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LCMS2 DEFAULT_MSG LCMS2_LIBRARY LCMS2_INCLUDE_DIR)
if(LCMS2_FOUND)
set( LCMS2_INCLUDE_DIRS ${LCMS2_INCLUDE_DIR})
set( LCMS2_LIBRARIES ${LCMS2_LIBRARY} )
endif()
# - Try to find LibCDR
# Once done this will define
#
# LIBCDR_FOUND - system has LibCDR
# LIBCDR_INCLUDE_DIRS - the LibCDR include directory
# LIBCDR_LIBRARIES - Link these to use LibCDR
# LIBCDR_DEFINITIONS - Compiler switches required for using LibCDR
#
# Copyright (c) 2008 Joshua L. Blocher <verbalshadow@gmail.com>
# Copyright (c) 2015 su_v <suv-sf@users.sf.net>
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
include(${CMAKE_CURRENT_LIST_DIR}/../HelperMacros.cmake)
if (LIBCDR_LIBRARIES AND LIBCDR_INCLUDE_DIRS)
# in cache already
set(LIBCDR_FOUND TRUE)
else (LIBCDR_LIBRARIES AND LIBCDR_INCLUDE_DIRS)
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
find_package(PkgConfig)
if (PKG_CONFIG_FOUND)
INKSCAPE_PKG_CONFIG_FIND(LIBCDR-0.1 libcdr-0.1 0 libcdr/libcdr.h libcdr-0.1 cdr-0.1)
if (LIBCDR-0.1_FOUND)
find_package(LibRevenge)
if (LIBREVENGE_FOUND)
list(APPEND LIBCDR_INCLUDE_DIRS ${LIBCDR-0.1_INCLUDE_DIRS})
list(APPEND LIBCDR_LIBRARIES ${LIBCDR-0.1_LIBRARIES})
list(APPEND LIBCDR_INCLUDE_DIRS ${LIBREVENGE_INCLUDE_DIRS})
list(APPEND LIBCDR_LIBRARIES ${LIBREVENGE_LIBRARIES})
set(LIBCDR01_FOUND TRUE)
endif (LIBREVENGE_FOUND)
else()
INKSCAPE_PKG_CONFIG_FIND(LIBCDR-0.0 libcdr-0.0 0 libcdr/libcdr.h libcdr-0.0 cdr-0.0)
INKSCAPE_PKG_CONFIG_FIND(LIBWPD-0.9 libwpd-0.9 0 libwpd/libwpd.h libwpd-0.9 wpd-0.9)
INKSCAPE_PKG_CONFIG_FIND(LIBWPD-STREAM-0.9 libwpd-stream-0.9 0 libwpd/libwpd.h libwpd-0.9 wpd-stream-0.9)
if (LIBCDR-0.0_FOUND AND LIBWPD-STREAM-0.9_FOUND AND LIBWPD-0.9_FOUND)
list(APPEND LIBCDR_INCLUDE_DIRS ${LIBCDR-0.0_INCLUDE_DIRS})
list(APPEND LIBCDR_LIBRARIES ${LIBCDR-0.0_LIBRARIES})
list(APPEND LIBCDR_INCLUDE_DIRS ${LIBWPD-0.9_INCLUDE_DIRS})
list(APPEND LIBCDR_LIBRARIES ${LIBWPD-0.9_LIBRARIES})
list(APPEND LIBCDR_INCLUDE_DIRS ${LIBWPD-STREAM-0.9_INCLUDE_DIRS})
list(APPEND LIBCDR_LIBRARIES ${LIBWPD-STREAM-0.9_LIBRARIES})
set(LIBCDR00_FOUND TRUE)
endif (LIBCDR-0.0_FOUND AND LIBWPD-STREAM-0.9_FOUND AND LIBWPD-0.9_FOUND)
endif (LIBCDR-0.1_FOUND)
if (LIBCDR-0.1_FOUND OR LIBCDR-0.0_FOUND)
set(LIBCDR_FOUND TRUE)
endif (LIBCDR-0.1_FOUND OR LIBCDR-0.0_FOUND)
endif (PKG_CONFIG_FOUND)
endif (LIBCDR_LIBRARIES AND LIBCDR_INCLUDE_DIRS)
# - Try to find LibRevenge
# Once done this will define
#
# LIBREVENGE_FOUND - system has LibRevenge
# LIBREVENGE_INCLUDE_DIRS - the LibRevenge include directory
# LIBREVENGE_LIBRARIES - Link these to use LibRevenge
# LIBREVENGE_DEFINITIONS - Compiler switches required for using LibRevenge
#
# Copyright (c) 2008 Joshua L. Blocher <verbalshadow@gmail.com>
# Copyright (c) 2015 su_v <suv-sf@users.sf.net>
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
include(${CMAKE_CURRENT_LIST_DIR}/../HelperMacros.cmake)
if (LIBREVENGE_LIBRARIES AND LIBREVENGE_INCLUDE_DIRS)
# in cache already
set(LIBREVENGE_FOUND TRUE)
else (LIBREVENGE_LIBRARIES AND LIBREVENGE_INCLUDE_DIRS)
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
find_package(PkgConfig)
if (PKG_CONFIG_FOUND)
INKSCAPE_PKG_CONFIG_FIND(LIBREVENGE-0.0 librevenge-0.0 0 librevenge/librevenge.h librevenge-0.0 revenge-0.0)
INKSCAPE_PKG_CONFIG_FIND(LIBREVENGE-STREAM-0.0 librevenge-stream-0.0 0 librevenge-0.0/librevenge-stream/librevenge-stream.h librevenge-stream-0.0 revenge-stream-0.0)
if (LIBREVENGE-0.0_FOUND AND LIBREVENGE-STREAM-0.0_FOUND)
list(APPEND LIBREVENGE_INCLUDE_DIRS ${LIBREVENGE-0.0_INCLUDE_DIRS})
list(APPEND LIBREVENGE_LIBRARIES ${LIBREVENGE-0.0_LIBRARIES})
list(APPEND LIBREVENGE_INCLUDE_DIRS ${LIBREVENGE-STREAM-0.0_INCLUDE_DIRS})
list(APPEND LIBREVENGE_LIBRARIES ${LIBREVENGE-STREAM-0.0_LIBRARIES})
set(LIBREVENGE00_FOUND TRUE)
endif (LIBREVENGE-0.0_FOUND AND LIBREVENGE-STREAM-0.0_FOUND)
if (LIBREVENGE-0.0_FOUND)
set(LIBREVENGE_FOUND TRUE)
endif (LIBREVENGE-0.0_FOUND)
endif (PKG_CONFIG_FOUND)
endif (LIBREVENGE_LIBRARIES AND LIBREVENGE_INCLUDE_DIRS)
# - Try to find LibVisio
# Once done this will define
#
# LIBVISIO_FOUND - system has LibVisio
# LIBVISIO_INCLUDE_DIRS - the LibVisio include directory
# LIBVISIO_LIBRARIES - Link these to use LibVisio
# LIBVISIO_DEFINITIONS - Compiler switches required for using LibVisio
#
# Copyright (c) 2008 Joshua L. Blocher <verbalshadow@gmail.com>
# Copyright (c) 2015 su_v <suv-sf@users.sf.net>
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
include(${CMAKE_CURRENT_LIST_DIR}/../HelperMacros.cmake)
if (LIBVISIO_LIBRARIES AND LIBVISIO_INCLUDE_DIRS)
# in cache already
set(LIBVISIO_FOUND TRUE)
else (LIBVISIO_LIBRARIES AND LIBVISIO_INCLUDE_DIRS)
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
find_package(PkgConfig)
if (PKG_CONFIG_FOUND)
INKSCAPE_PKG_CONFIG_FIND(LIBVISIO-0.1 libvisio-0.1 0 libvisio/libvisio.h libvisio-0.1 visio-0.1)
if (LIBVISIO-0.1_FOUND)
find_package(LibRevenge)
if (LIBREVENGE_FOUND)
list(APPEND LIBVISIO_INCLUDE_DIRS ${LIBVISIO-0.1_INCLUDE_DIRS})
list(APPEND LIBVISIO_LIBRARIES ${LIBVISIO-0.1_LIBRARIES})
list(APPEND LIBVISIO_INCLUDE_DIRS ${LIBREVENGE_INCLUDE_DIRS})
list(APPEND LIBVISIO_LIBRARIES ${LIBREVENGE_LIBRARIES})
set(LIBVISIO01_FOUND TRUE)
endif (LIBREVENGE_FOUND)
else()
INKSCAPE_PKG_CONFIG_FIND(LIBVISIO-0.0 libvisio-0.0 0 libvisio/libvisio.h libvisio-0.0 visio-0.0)
INKSCAPE_PKG_CONFIG_FIND(LIBWPD-0.9 libwpd-0.9 0 libwpd/libwpd.h libwpd-0.9 wpd-0.9)
INKSCAPE_PKG_CONFIG_FIND(LIBWPD-STREAM-0.9 libwpd-stream-0.9 0 libwpd/libwpd.h libwpd-0.9 wpd-stream-0.9)
if (LIBVISIO-0.0_FOUND AND LIBWPD-STREAM-0.9_FOUND AND LIBWPD-0.9_FOUND)
list(APPEND LIBVISIO_INCLUDE_DIRS ${LIBVISIO-0.0_INCLUDE_DIRS})
list(APPEND LIBVISIO_LIBRARIES ${LIBVISIO-0.0_LIBRARIES})
list(APPEND LIBVISIO_INCLUDE_DIRS ${LIBWPD-0.9_INCLUDE_DIRS})
list(APPEND LIBVISIO_LIBRARIES ${LIBWPD-0.9_LIBRARIES})
list(APPEND LIBVISIO_INCLUDE_DIRS ${LIBWPD-STREAM-0.9_INCLUDE_DIRS})
list(APPEND LIBVISIO_LIBRARIES ${LIBWPD-STREAM-0.9_LIBRARIES})
set(LIBVISIO00_FOUND TRUE)
endif (LIBVISIO-0.0_FOUND AND LIBWPD-STREAM-0.9_FOUND AND LIBWPD-0.9_FOUND)
endif (LIBVISIO-0.1_FOUND)
if (LIBVISIO-0.1_FOUND OR LIBVISIO-0.0_FOUND)
set(LIBVISIO_FOUND TRUE)
endif (LIBVISIO-0.1_FOUND OR LIBVISIO-0.0_FOUND)
endif (PKG_CONFIG_FOUND)
endif (LIBVISIO_LIBRARIES AND LIBVISIO_INCLUDE_DIRS)
# - Try to find LibWPG
# Once done this will define
#
# LIBWPG_FOUND - system has LibWPG
# LIBWPG_INCLUDE_DIRS - the LibWPG include directory
# LIBWPG_LIBRARIES - Link these to use LibWPG
# LIBWPG_DEFINITIONS - Compiler switches required for using LibWPG
#
# Copyright (c) 2008 Joshua L. Blocher <verbalshadow@gmail.com>
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
include(${CMAKE_CURRENT_LIST_DIR}/../HelperMacros.cmake)
if (LIBWPG_LIBRARIES AND LIBWPG_INCLUDE_DIRS)
# in cache already
set(LIBWPG_FOUND TRUE)
else (LIBWPG_LIBRARIES AND LIBWPG_INCLUDE_DIRS)
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
find_package(PkgConfig)
if (PKG_CONFIG_FOUND)
INKSCAPE_PKG_CONFIG_FIND(LIBWPG-0.3 libwpg-0.3 0 libwpg/libwpg.h libwpg-0.3 wpg-0.3)
if (LIBWPG-0.3_FOUND