diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2015-05-08 17:26:29 +0000 |
|---|---|---|
| committer | Krzysztof KosiĆski <tweenk.pl@gmail.com> | 2015-05-08 17:26:29 +0000 |
| commit | f31b2c75e1313ccceeb6d33cc14aa545d4d370f9 (patch) | |
| tree | 444b38fe397f34ee5c298ed0efd5cc9f49afb7cf /CMakeScripts/Modules | |
| parent | More helper/geom.h pruning. (diff) | |
| parent | cmake: Bring cmake installation in line with autotools (bug #1451481) (diff) | |
| download | inkscape-f31b2c75e1313ccceeb6d33cc14aa545d4d370f9.tar.gz inkscape-f31b2c75e1313ccceeb6d33cc14aa545d4d370f9.zip | |
Merge from trunk
(bzr r14059.2.11)
Diffstat (limited to 'CMakeScripts/Modules')
| -rw-r--r-- | CMakeScripts/Modules/FindIconv.cmake | 60 | ||||
| -rw-r--r-- | CMakeScripts/Modules/FindIntl.cmake | 127 | ||||
| -rw-r--r-- | CMakeScripts/Modules/FindLibCDR.cmake | 56 | ||||
| -rw-r--r-- | CMakeScripts/Modules/FindLibRevenge.cmake | 41 | ||||
| -rw-r--r-- | CMakeScripts/Modules/FindLibVisio.cmake | 56 | ||||
| -rw-r--r-- | CMakeScripts/Modules/FindLibWPG.cmake | 65 |
6 files changed, 379 insertions, 26 deletions
diff --git a/CMakeScripts/Modules/FindIconv.cmake b/CMakeScripts/Modules/FindIconv.cmake new file mode 100644 index 000000000..338d17d05 --- /dev/null +++ b/CMakeScripts/Modules/FindIconv.cmake @@ -0,0 +1,60 @@ +# - 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 +) diff --git a/CMakeScripts/Modules/FindIntl.cmake b/CMakeScripts/Modules/FindIntl.cmake new file mode 100644 index 000000000..e6c5f6d0c --- /dev/null +++ b/CMakeScripts/Modules/FindIntl.cmake @@ -0,0 +1,127 @@ +#.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() diff --git a/CMakeScripts/Modules/FindLibCDR.cmake b/CMakeScripts/Modules/FindLibCDR.cmake new file mode 100644 index 000000000..57a04807e --- /dev/null +++ b/CMakeScripts/Modules/FindLibCDR.cmake @@ -0,0 +1,56 @@ +# - 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) + diff --git a/CMakeScripts/Modules/FindLibRevenge.cmake b/CMakeScripts/Modules/FindLibRevenge.cmake new file mode 100644 index 000000000..90d1ecf06 --- /dev/null +++ b/CMakeScripts/Modules/FindLibRevenge.cmake @@ -0,0 +1,41 @@ +# - 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) + diff --git a/CMakeScripts/Modules/FindLibVisio.cmake b/CMakeScripts/Modules/FindLibVisio.cmake new file mode 100644 index 000000000..a4e88aeaa --- /dev/null +++ b/CMakeScripts/Modules/FindLibVisio.cmake @@ -0,0 +1,56 @@ +# - 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) + diff --git a/CMakeScripts/Modules/FindLibWPG.cmake b/CMakeScripts/Modules/FindLibWPG.cmake index 4f173da2d..ea241a570 100644 --- a/CMakeScripts/Modules/FindLibWPG.cmake +++ b/CMakeScripts/Modules/FindLibWPG.cmake @@ -23,32 +23,45 @@ else (LIBWPG_LIBRARIES AND LIBWPG_INCLUDE_DIRS) # in the FIND_PATH() and FIND_LIBRARY() calls find_package(PkgConfig) if (PKG_CONFIG_FOUND) - INKSCAPE_PKG_CONFIG_FIND(LIBWPG-0.1 libwpg-0.1 0 libwpg/libwpg.h libwpg-0.1 wpg-0.1) - INKSCAPE_PKG_CONFIG_FIND(LIBWPG-STREAM-0.1 libwpg-stream-0.1 0 libwpg/libwpg.h libwpg-0.1 wpg-stream-0.1) - INKSCAPE_PKG_CONFIG_FIND(LIBWPD-0.8 libwpd-0.8 0 libwpd/libwpd.h libwpd-0.8 wpd-0.8) - if (LIBWPG-0.1_FOUND AND LIBWPG-STREAM-0.1_FOUND AND LIBWPD-0.8_FOUND) - list(APPEND LIBWPG_INCLUDE_DIRS ${LIBWPG-0.1_INCLUDE_DIRS}) - list(APPEND LIBWPG_LIBRARIES ${LIBWPG-0.1_LIBRARIES}) - list(APPEND LIBWPG_INCLUDE_DIRS ${LIBWPG-STREAM-0.1_INCLUDE_DIRS}) - list(APPEND LIBWPG_LIBRARIES ${LIBWPG-STREAM-0.1_LIBRARIES}) - list(APPEND LIBWPG_INCLUDE_DIRS ${LIBWPD-0.8_INCLUDE_DIRS}) - list(APPEND LIBWPG_LIBRARIES ${LIBWPD-0.8_LIBRARIES}) - set(LIBWPG01_FOUND TRUE) - endif (LIBWPG-0.1_FOUND AND LIBWPG-STREAM-0.1_FOUND AND LIBWPD-0.8_FOUND) - INKSCAPE_PKG_CONFIG_FIND(LIBWPG-0.2 libwpg-0.2 0 libwpg/libwpg.h libwpg-0.2 wpg-0.2) - 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 (LIBWPG02_FOUND) - list(APPEND LIBWPG_INCLUDE_DIRS ${LIBWPG02_INCLUDE_DIRS}) - list(APPEND LIBWPG_LIBRARIES ${LIBWPG02_LIBRARIES}) - list(APPEND LIBWPG_INCLUDE_DIRS ${LIBWPD-0.9_INCLUDE_DIRS}) - list(APPEND LIBWPG_LIBRARIES ${LIBWPD-0.9_LIBRARIES}) - list(APPEND LIBWPG_INCLUDE_DIRS ${LIBWPD-STREAM-0.9_INCLUDE_DIRS}) - list(APPEND LIBWPG_LIBRARIES ${LIBWPD-STREAM-0.9_LIBRARIES}) - set(LIBWPG02_FOUND TRUE) - endif (LIBWPG02_FOUND) - if (LIBWPG01_FOUND OR LIBWPG_02_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) + find_package(LibRevenge) + if (LIBREVENGE_FOUND) + list(APPEND LIBWPG_INCLUDE_DIRS ${LIBWPG-0.3_INCLUDE_DIRS}) + list(APPEND LIBWPG_LIBRARIES ${LIBWPG-0.3_LIBRARIES}) + list(APPEND LIBWPG_INCLUDE_DIRS ${LIBREVENGE_INCLUDE_DIRS}) + list(APPEND LIBWPG_LIBRARIES ${LIBREVENGE_LIBRARIES}) + set(LIBWPG03_FOUND TRUE) + endif (LIBREVENGE_FOUND) + else() + INKSCAPE_PKG_CONFIG_FIND(LIBWPG-0.2 libwpg-0.2 0 libwpg/libwpg.h libwpg-0.2 wpg-0.2) + 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 (LIBWPG-0.2_FOUND AND LIBWPD-STREAM-0.9_FOUND AND LIBWPD-0.9_FOUND) + list(APPEND LIBWPG_INCLUDE_DIRS ${LIBWPG-0.2_INCLUDE_DIRS}) + list(APPEND LIBWPG_LIBRARIES ${LIBWPG-0.2_LIBRARIES}) + list(APPEND LIBWPG_INCLUDE_DIRS ${LIBWPD-0.9_INCLUDE_DIRS}) + list(APPEND LIBWPG_LIBRARIES ${LIBWPD-0.9_LIBRARIES}) + list(APPEND LIBWPG_INCLUDE_DIRS ${LIBWPD-STREAM-0.9_INCLUDE_DIRS}) + list(APPEND LIBWPG_LIBRARIES ${LIBWPD-STREAM-0.9_LIBRARIES}) + set(LIBWPG02_FOUND TRUE) + else() + INKSCAPE_PKG_CONFIG_FIND(LIBWPG-0.1 libwpg-0.1 0 libwpg/libwpg.h libwpg-0.1 wpg-0.1) + INKSCAPE_PKG_CONFIG_FIND(LIBWPG-STREAM-0.1 libwpg-stream-0.1 0 libwpg/libwpg.h libwpg-0.1 wpg-stream-0.1) + INKSCAPE_PKG_CONFIG_FIND(LIBWPD-0.8 libwpd-0.8 0 libwpd/libwpd.h libwpd-0.8 wpd-0.8) + if (LIBWPG-0.1_FOUND AND LIBWPG-STREAM-0.1_FOUND AND LIBWPD-0.8_FOUND) + list(APPEND LIBWPG_INCLUDE_DIRS ${LIBWPG-0.1_INCLUDE_DIRS}) + list(APPEND LIBWPG_LIBRARIES ${LIBWPG-0.1_LIBRARIES}) + list(APPEND LIBWPG_INCLUDE_DIRS ${LIBWPG-STREAM-0.1_INCLUDE_DIRS}) + list(APPEND LIBWPG_LIBRARIES ${LIBWPG-STREAM-0.1_LIBRARIES}) + list(APPEND LIBWPG_INCLUDE_DIRS ${LIBWPD-0.8_INCLUDE_DIRS}) + list(APPEND LIBWPG_LIBRARIES ${LIBWPD-0.8_LIBRARIES}) + set(LIBWPG01_FOUND TRUE) + endif (LIBWPG-0.1_FOUND AND LIBWPG-STREAM-0.1_FOUND AND LIBWPD-0.8_FOUND) + endif (LIBWPG-0.2_FOUND AND LIBWPD-STREAM-0.9_FOUND AND LIBWPD-0.9_FOUND) + endif (LIBWPG-0.3_FOUND) + if (LIBWPG-0.1_FOUND OR LIBWPG-0.2_FOUND OR LIBWPG-0.3_FOUND) set(LIBWPG_FOUND TRUE) - endif (LIBWPG01_FOUND OR LIBWPG_02_FOUND) + endif (LIBWPG-0.1_FOUND OR LIBWPG-0.2_FOUND OR LIBWPG-0.3_FOUND) endif (PKG_CONFIG_FOUND) endif (LIBWPG_LIBRARIES AND LIBWPG_INCLUDE_DIRS) |
