Commit afbe9c69 authored by Norbert Preining's avatar Norbert Preining

Imported Upstream version 0.6.0

parent b16143c8
_Steps to reproduce the problem_:
1.
2.
3.
_Expected output_:
_Actual output_:
_TeXworks version_:
_TeXworks obtained from_:
_Operating system_:
_Please provide any additional information below_:
# Canonical author names after migration from Subversion for nicer (short)log.
# Stefan Löffler
Stefan Löffler <st.loeffler@gmail.com> <st.loeffler@9a2a4a0b-1251-0410-9248-99fc04669920>
Stefan Löffler <st.loeffler@gmail.com> <st.loeffler@gmail.com@9a2a4a0b-1251-0410-9248-99fc04669920>
# Jonathan Kew
Jonathan Kew <jfkthame@gmail.com> <jonathan@jfkew.plus.com@9a2a4a0b-1251-0410-9248-99fc04669920>
Jonathan Kew <jfkthame@gmail.com> <jonathan@9a2a4a0b-1251-0410-9248-99fc04669920>
Jonathan Kew <jfkthame@gmail.com> <jfkthame@9a2a4a0b-1251-0410-9248-99fc04669920>
# Charles Sharpsteen
Charles Sharpsteen <charles.sharpsteen@gmail.com> <charles.sharpsteen@gmail.com@9a2a4a0b-1251-0410-9248-99fc04669920>
language: cpp
matrix:
include:
- env: TARGET_OS=osx QT=4
os: osx
- env: TARGET_OS=osx QT=5
os: osx
- env: TARGET_OS=win QT=4
os: linux
- env: TARGET_OS=win QT=5
os: linux
- env: TARGET_OS=linux QT=4
os: linux
- env: TARGET_OS=linux QT=5
os: linux
dist: trusty
sudo: required
before_install:
- ${TRAVIS_BUILD_DIR}/travis-ci/get-dependencies.sh
before_script:
- ${TRAVIS_BUILD_DIR}/travis-ci/configure.sh
script:
- ${TRAVIS_BUILD_DIR}/travis-ci/build.sh
after_success:
- ${TRAVIS_BUILD_DIR}/travis-ci/package.sh
deploy:
- provider: bintray
skip_cleanup: true
file: ${TRAVIS_BUILD_DIR}/travis-ci/bintray.json
user: stloeffler
on:
all_branches: true
condition: -f ${TRAVIS_BUILD_DIR}/travis-ci/bintray.json
key:
secure: A+7WxDVhnvJ229GlBOvo9kq9+xh0FYeau9ZIUh7GyuRvfQ0WTORQ+6OKq8KnRIhZQuk2Vji7hknlMV8ds22NI7hA5kfQf9iUUomBChSjOWWTUed5ldW7UDVRJk9njH7QNUycjJuU0MEctRH+WkcCXjsJi11c/JEnDgKO6Pi9H5ryGS5VZd24HKpiAccoYpu0OlErfUctZ/0NT97v4Bb2DXB1ovb3OUpPf/4s6EmAVLGjEAYuiAhLcvPFQ52A+ywBHrGQ3c9DMEtXOoHnCW1XB4mu3lZ/g4/GxZxkq7KW1KAi1F+IyZKzBJUu12dNVWa4Mk9LAyOmfzQNHH8hgZh5RJ5pQQ12a/zQk0fkDODFvzbbDv4pQSmV/M8qHIPOmRenzZxy2dmhhBNIuuPf6QO1bT8ZM0I/7WKUqG6P+Oys5+5jlDw1o0t73h7451xl+BSz8Z54CHQPY/FviK3ED/dwBj3Xz8ObseOpSa2EQB42K6ckozYeUE+0KexX30ejBa/Sx9xM4gdJU56UWGAmBlr73cfMKsx9KaMurKPiSDCEwgQ2aVwXF7/9Z5DRrkUYVvnpla95M5rnuOtH5qalz9j0Q54pkob5NTkxDI0QXUmVSgf+kbx7xNHuNhRj/akVknU2uESLv2TOZNCD2NrFaqF4CqcnxcdnK/Eh+sWfcOYe3ls=
- provider: script
skip_cleanup: true
on:
all_branches: true
condition: -f ${TRAVIS_BUILD_DIR}/travis-ci/dput-launchpad.sh
script: sh "${TRAVIS_BUILD_DIR}/travis-ci/dput-launchpad.sh"
- provider: releases
skip_cleanup: true
api_key:
secure: qSlvMc9Hv/Y9EsqNTuriOB1DieeHMZlJr41DM9Vwy8HPLgoQ8an1UmgtpFj7+wcV58Glr+vvUZRjI8OH8agvAzG7xaPESHQbQzJcDuvDW9V1WR0yOxYPUmbHLq2imwnEAuR8Mik1cA/zYE1781VAuc2WB8ND6roqYj33fi8TcuX9E6I3lDfTHdEk/s6m7N0zZOPBgg6FORrLqiVSSfhkDboyJbO9MSjDK8VIImPajz47orv/QExkbZq8ECU0O9RQNk8cLUZlNf7xRmJBFkLEMe91PJXPkJ8+gddTkQaAKxIL6qCY80yepElF6dVYW6ubH9QowGESuBq66Z3/UD5Q5vd0hCc9zWTizWuzfStHFxlYmETNltuQ8WDUYUqd+rrnpRSQiyuifFeQul76MrA4OKhx8QPp93UYUrn8pgR7fZy1ch/GCl31lxYkpFE6MW2ifsqYDpM9K+oYGwhY2Se/AlkQF4W7wu3+uMIBr5YDqrXWlF0AMalqmBLHj2OP+MuFHmDb4BCNKsUHFfD7fw4sd+wix01Sfm0Jph2PRE2LBOKl3C3gdGzK8t7u5NzyejnQOIudEDLzPZBjyvAnNFemMI/4uQNqZK3Mebm5yqdSH5XKzBqNUUFpgeXTZBgkriOOOCVUgkxStqOq55JZk+XSU1o6A87KqavvuUD7kyRyTN8=
file: "$(cat ${TRAVIS_BUILD_DIR}/travis-ci/github-releases.txt)"
on:
all_branches: true
tags: true
condition: -f "${TRAVIS_BUILD_DIR}/travis-ci/github-releases.txt"
......@@ -2,7 +2,7 @@ Unless noted otherwise, all files in this directory and are released under the
following terms:
Copyright (C) 2011-2014 Charlie Sharpsteen, Stefan Löffler
Copyright (C) 2011-2016 Charlie Sharpsteen, Stefan Löffler
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
......
This diff is collapsed.
# - Try to find Fontconfig
# Once done this will define
#
# FONTCONFIG_FOUND - system has Fontconfig
# FONTCONFIG_INCLUDE_DIR - the Fontconfig include directory
# FONTCONFIG_LIBRARIES - Link these to use Fontconfig
#
# Redistribution and use of this file is allowed according to the terms of the
# MIT license. For details see the file COPYING-CMAKE-MODULES.
if ( FONTCONFIG_INCLUDE_DIR AND FONTCONFIG_LIBRARIES )
# in cache already
SET(Fontconfig_FIND_QUIETLY TRUE)
endif ( FONTCONFIG_INCLUDE_DIR AND FONTCONFIG_LIBRARIES )
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
if( NOT WIN32 )
find_package(PkgConfig)
pkg_check_modules(FONTCONFIG_PKG QUIET fontconfig)
endif( NOT WIN32 )
FIND_PATH(FONTCONFIG_INCLUDE_DIR NAMES fontconfig/fontconfig.h
PATHS
/usr/local/include
/usr/X11/include
/usr/include
HINTS
${FONTCONFIG_PKG_INCLUDE_DIRS} # Generated by pkg-config
)
FIND_LIBRARY(FONTCONFIG_LIBRARIES NAMES fontconfig ${FONTCONFIG_PKG_LIBRARIES}
PATHS
/usr/local
/usr/X11
/usr
HINTS
${FONTCONFIG_PKG_LIBRARY_DIRS} # Generated by pkg-config
PATH_SUFFIXES
lib64
lib
)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Fontconfig DEFAULT_MSG FONTCONFIG_LIBRARIES FONTCONFIG_INCLUDE_DIR )
# show the FONTCONFIG_INCLUDE_DIR and FONTCONFIG_LIBRARIES variables only in the advanced view
MARK_AS_ADVANCED(FONTCONFIG_INCLUDE_DIR FONTCONFIG_LIBRARIES )
# Locate Lua library
# This module defines
# LUA_EXECUTABLE, if found
# LUA_FOUND, if false, do not try to link to Lua
# LUA_LIBRARIES
# LUA_INCLUDE_DIR, where to find lua.h
# LUA_VERSION_STRING, the version of Lua found (since CMake 2.8.8)
#.rst:
# FindLua
# -------
#
#
#
# Locate Lua library This module defines
#
# ::
#
# LUA_FOUND - if false, do not try to link to Lua
# LUA_LIBRARIES - both lua and lualib
# LUA_INCLUDE_DIR - where to find lua.h
# LUA_VERSION_STRING - the version of Lua found
# LUA_VERSION_MAJOR - the major version of Lua
# LUA_VERSION_MINOR - the minor version of Lua
# LUA_VERSION_PATCH - the patch version of Lua
#
#
#
# Note that the expected include convention is
# #include "lua.h"
#
# ::
#
# #include "lua.h"
#
# and not
# #include <lua/lua.h>
# This is because, the lua location is not standardized and may exist
# in locations other than lua/
#
# ::
#
# #include <lua/lua.h>
#
# This is because, the lua location is not standardized and may exist in
# locations other than lua/
#=============================================================================
# Copyright 2007-2009 Kitware, Inc.
# Modified to support Lua 5.2 by LuaDist 2012
# Copyright 2013 Rolf Eike Beer <eike@sf-mail.de>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
......@@ -26,93 +46,126 @@
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
#
# The required version of Lua can be specified using the
# standard syntax, e.g. FIND_PACKAGE(Lua 5.1)
# Otherwise the module will search for any available Lua implementation
# Always search for non-versioned lua first (recommended)
SET(_POSSIBLE_LUA_INCLUDE include include/lua)
SET(_POSSIBLE_LUA_EXECUTABLE lua)
SET(_POSSIBLE_LUA_LIBRARY lua)
unset(_lua_include_subdirs)
unset(_lua_library_names)
# Determine possible naming suffixes (there is no standard for this)
IF(Lua_FIND_VERSION_MAJOR AND Lua_FIND_VERSION_MINOR)
SET(_POSSIBLE_SUFFIXES "${Lua_FIND_VERSION_MAJOR}${Lua_FIND_VERSION_MINOR}" "${Lua_FIND_VERSION_MAJOR}.${Lua_FIND_VERSION_MINOR}" "-${Lua_FIND_VERSION_MAJOR}.${Lua_FIND_VERSION_MINOR}")
ELSE(Lua_FIND_VERSION_MAJOR AND Lua_FIND_VERSION_MINOR)
SET(_POSSIBLE_SUFFIXES "52" "5.2" "-5.2" "51" "5.1" "-5.1")
ENDIF(Lua_FIND_VERSION_MAJOR AND Lua_FIND_VERSION_MINOR)
# this is a function only to have all the variables inside go away automatically
function(set_lua_version_vars)
set(LUA_VERSIONS5 5.3 5.2 5.1 5.0)
# Set up possible search names and locations
FOREACH(_SUFFIX ${_POSSIBLE_SUFFIXES})
LIST(APPEND _POSSIBLE_LUA_INCLUDE "include/lua${_SUFFIX}")
LIST(APPEND _POSSIBLE_LUA_EXECUTABLE "lua${_SUFFIX}")
LIST(APPEND _POSSIBLE_LUA_LIBRARY "lua${_SUFFIX}")
ENDFOREACH(_SUFFIX)
if (Lua_FIND_VERSION_EXACT)
if (Lua_FIND_VERSION_COUNT GREATER 1)
set(lua_append_versions ${Lua_FIND_VERSION_MAJOR}.${Lua_FIND_VERSION_MINOR})
endif ()
elseif (Lua_FIND_VERSION)
# once there is a different major version supported this should become a loop
if (NOT Lua_FIND_VERSION_MAJOR GREATER 5)
if (Lua_FIND_VERSION_COUNT EQUAL 1)
set(lua_append_versions ${LUA_VERSIONS5})
else ()
foreach (subver IN LISTS LUA_VERSIONS5)
if (NOT subver VERSION_LESS ${Lua_FIND_VERSION})
list(APPEND lua_append_versions ${subver})
endif ()
endforeach ()
endif ()
endif ()
else ()
# once there is a different major version supported this should become a loop
set(lua_append_versions ${LUA_VERSIONS5})
endif ()
# Find the lua executable
FIND_PROGRAM(LUA_EXECUTABLE
NAMES ${_POSSIBLE_LUA_EXECUTABLE}
)
foreach (ver IN LISTS lua_append_versions)
string(REGEX MATCH "^([0-9]+)\\.([0-9]+)$" _ver "${ver}")
list(APPEND _lua_include_subdirs
include/lua${CMAKE_MATCH_1}${CMAKE_MATCH_2}
include/lua${CMAKE_MATCH_1}.${CMAKE_MATCH_2}
include/lua-${CMAKE_MATCH_1}.${CMAKE_MATCH_2}
)
list(APPEND _lua_library_names
lua${CMAKE_MATCH_1}${CMAKE_MATCH_2}
lua${CMAKE_MATCH_1}.${CMAKE_MATCH_2}
lua-${CMAKE_MATCH_1}.${CMAKE_MATCH_2}
)
endforeach ()
# Find the lua header
FIND_PATH(LUA_INCLUDE_DIR lua.h
set(_lua_include_subdirs "${_lua_include_subdirs}" PARENT_SCOPE)
set(_lua_library_names "${_lua_library_names}" PARENT_SCOPE)
endfunction(set_lua_version_vars)
set_lua_version_vars()
find_path(LUA_INCLUDE_DIR lua.h
HINTS
$ENV{LUA_DIR}
PATH_SUFFIXES ${_POSSIBLE_LUA_INCLUDE}
ENV LUA_DIR
PATH_SUFFIXES ${_lua_include_subdirs} include/lua include
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
)
unset(_lua_include_subdirs)
# Find the lua library
FIND_LIBRARY(LUA_LIBRARY
NAMES ${_POSSIBLE_LUA_LIBRARY}
find_library(LUA_LIBRARY
NAMES ${_lua_library_names} lua
HINTS
$ENV{LUA_DIR}
PATH_SUFFIXES lib64 lib
ENV LUA_DIR
PATH_SUFFIXES lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw
/opt
)
unset(_lua_library_names)
IF(LUA_LIBRARY)
# include the math library for Unix
IF(UNIX AND NOT APPLE)
FIND_LIBRARY(LUA_MATH_LIBRARY m)
SET( LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}" CACHE STRING "Lua Libraries")
# For Windows and Mac, don't need to explicitly include the math library
ELSE(UNIX AND NOT APPLE)
SET( LUA_LIBRARIES "${LUA_LIBRARY}" CACHE STRING "Lua Libraries")
ENDIF(UNIX AND NOT APPLE)
ENDIF(LUA_LIBRARY)
if (LUA_LIBRARY)
# include the math library for Unix
if (UNIX AND NOT APPLE AND NOT BEOS)
find_library(LUA_MATH_LIBRARY m)
set(LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}")
# For Windows and Mac, don't need to explicitly include the math library
else ()
set(LUA_LIBRARIES "${LUA_LIBRARY}")
endif ()
endif ()
# Determine Lua version
IF(LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/lua.h")
FILE(STRINGS "${LUA_INCLUDE_DIR}/lua.h" lua_version_str REGEX "^#define[ \t]+LUA_RELEASE[ \t]+\"Lua .+\"")
if (LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/lua.h")
# At least 5.[012] have different ways to express the version
# so all of them need to be tested. Lua 5.2 defines LUA_VERSION
# and LUA_RELEASE as joined by the C preprocessor, so avoid those.
file(STRINGS "${LUA_INCLUDE_DIR}/lua.h" lua_version_strings
REGEX "^#define[ \t]+LUA_(RELEASE[ \t]+\"Lua [0-9]|VERSION([ \t]+\"Lua [0-9]|_[MR])).*")
STRING(REGEX REPLACE "^#define[ \t]+LUA_RELEASE[ \t]+\"Lua ([^\"]+)\".*" "\\1" LUA_VERSION_STRING "${lua_version_str}")
UNSET(lua_version_str)
ENDIF()
string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_MAJOR[ \t]+\"([0-9])\"[ \t]*;.*" "\\1" LUA_VERSION_MAJOR ";${lua_version_strings};")
if (LUA_VERSION_MAJOR MATCHES "^[0-9]+$")
string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_MINOR[ \t]+\"([0-9])\"[ \t]*;.*" "\\1" LUA_VERSION_MINOR ";${lua_version_strings};")
string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_RELEASE[ \t]+\"([0-9])\"[ \t]*;.*" "\\1" LUA_VERSION_PATCH ";${lua_version_strings};")
set(LUA_VERSION_STRING "${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}.${LUA_VERSION_PATCH}")
else ()
string(REGEX REPLACE ".*;#define[ \t]+LUA_RELEASE[ \t]+\"Lua ([0-9.]+)\"[ \t]*;.*" "\\1" LUA_VERSION_STRING ";${lua_version_strings};")
if (NOT LUA_VERSION_STRING MATCHES "^[0-9.]+$")
string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION[ \t]+\"Lua ([0-9.]+)\"[ \t]*;.*" "\\1" LUA_VERSION_STRING ";${lua_version_strings};")
endif ()
string(REGEX REPLACE "^([0-9]+)\\.[0-9.]*$" "\\1" LUA_VERSION_MAJOR "${LUA_VERSION_STRING}")
string(REGEX REPLACE "^[0-9]+\\.([0-9]+)[0-9.]*$" "\\1" LUA_VERSION_MINOR "${LUA_VERSION_STRING}")
string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]).*" "\\1" LUA_VERSION_PATCH "${LUA_VERSION_STRING}")
endif ()
INCLUDE(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if
unset(lua_version_strings)
endif()
#include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) #sl
# handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if
# all listed variables are TRUE
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua
REQUIRED_VARS LUA_LIBRARIES LUA_INCLUDE_DIR
VERSION_VAR LUA_VERSION_STRING)
MARK_AS_ADVANCED(LUA_INCLUDE_DIR LUA_LIBRARIES LUA_LIBRARY LUA_MATH_LIBRARY LUA_EXECUTABLE)
mark_as_advanced(LUA_INCLUDE_DIR LUA_LIBRARY LUA_MATH_LIBRARY)
# - Try to find Poppler and Poppler-Qt4
# Once done this will define
#
# POPPLER_FOUND - system has Poppler and Poppler-Qt4
# POPPLER_HAS_XPDF - A boolean indicating if Poppler XPDF headers are available
# POPPLER_NEEDS_FONTCONFIG - A boolean indicating if libpoppler depends on libfontconfig
# POPPLER_XPDF_INCLUDE_DIR - the include directory for Poppler XPDF headers
# POPPLER_QT_INCLUDE_DIR - the include directory for Poppler-Qt4 headers
# POPPLER_QT_LIBRARIES - Link this to use only libpoppler-Qt4
# POPPLER_LIBRARIES - Link these to use Poppler and Poppler-Qt4
#
# Note: the Poppler-cpp include directory is currently not needed by TeXworks
#
# Redistribution and use of this file is allowed according to the terms of the
# MIT license. For details see the file COPYING-CMAKE-MODULES.
if ( POPPLER_LIBRARIES )
# in cache already
SET(Poppler_FIND_QUIETLY TRUE)
endif ( POPPLER_LIBRARIES )
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
if( NOT WIN32 )
find_package(PkgConfig)
pkg_check_modules(POPPLER_BASE_PKG QUIET poppler)
pkg_check_modules(POPPLER_QT_PKG QUIET poppler-qt${QT_VERSION_MAJOR})
endif( NOT WIN32 )
# Check for Poppler XPDF headers (optional)
FIND_PATH(POPPLER_XPDF_INCLUDE_DIR NAMES poppler-config.h
PATHS
/usr/local/include
/usr/include
HINTS
${POPPLER_BASE_PKG_INCLUDE_DIRS} # Generated by pkg-config
PATH_SUFFIXES
poppler
)
IF( NOT(POPPLER_XPDF_INCLUDE_DIR) )
MESSAGE( STATUS "Could not find poppler-config.h, disabling support for Xpdf headers." )
SET( POPPLER_HAS_XPDF false )
ELSE( NOT(POPPLER_XPDF_INCLUDE_DIR) )
SET( POPPLER_HAS_XPDF true )
ENDIF( NOT(POPPLER_XPDF_INCLUDE_DIR) )
# Find libpoppler, libpoppler-qt4 and associated header files (Required)
FIND_LIBRARY(POPPLER_BASE_LIBRARIES NAMES poppler ${POPPLER_BASE_PKG_LIBRARIES}
PATHS
/usr/local
/usr
HINTS
${POPPLER_BASE_PKG_LIBRARY_DIRS} # Generated by pkg-config
PATH_SUFFIXES
lib64
lib
)
IF ( NOT(POPPLER_BASE_LIBRARIES) )
MESSAGE(STATUS "Could not find libpoppler." )
ENDIF ()
# Scan poppler libraries for dependencies on Fontconfig
INCLUDE(GetPrerequisites)
MARK_AS_ADVANCED(gp_cmd)
GET_PREREQUISITES("${POPPLER_BASE_LIBRARIES}" POPPLER_PREREQS TRUE FALSE "" "")
IF ("${POPPLER_PREREQS}" MATCHES "fontconfig")
SET(POPPLER_NEEDS_FONTCONFIG TRUE)
ELSE ()
SET(POPPLER_NEEDS_FONTCONFIG FALSE)
ENDIF ()
FIND_PATH(POPPLER_QT_INCLUDE_DIR NAMES poppler-qt${QT_VERSION_MAJOR}.h poppler-link.h
PATHS
/usr/local/include
/usr/include
HINTS
${POPPLER_QT_PKG_INCLUDE_DIRS} # Generated by pkg-config
PATH_SUFFIXES
poppler
qt${QT_VERSION_MAJOR}
poppler/qt${QT_VERSION_MAJOR}
)
IF ( NOT(POPPLER_QT_INCLUDE_DIR) )
MESSAGE(STATUS "Could not find Poppler-Qt${QT_VERSION_MAJOR} headers." )
ENDIF ()
FIND_LIBRARY(POPPLER_QT_LIBRARIES NAMES poppler-qt${QT_VERSION_MAJOR} ${POPPLER_QT_PKG_LIBRARIES}
PATHS
/usr/local
/usr
HINTS
${POPPLER_PKG_LIBRARY_DIRS} # Generated by pkg-config
PATH_SUFFIXES
lib64
lib
)
MARK_AS_ADVANCED(POPPLER_QT_LIBRARIES)
IF ( NOT(POPPLER_QT_LIBRARIES) )
MESSAGE(STATUS "Could not find libpoppler-qt${QT_VERSION_MAJOR}." )
ENDIF ()
SET(POPPLER_LIBRARIES ${POPPLER_QT_LIBRARIES} ${POPPLER_BASE_LIBRARIES})
IF ( POPPLER_QT_INCLUDE_DIR AND EXISTS "${POPPLER_QT_INCLUDE_DIR}/../poppler-config.h" )
file(STRINGS "${POPPLER_QT_INCLUDE_DIR}/../poppler-config.h" POPPLER_CONFIG_H REGEX "^#define POPPLER_VERSION \"[^\"]*\"$")
string(REGEX REPLACE "^.*POPPLER_VERSION \"([0-9]+).*$" "\\1" POPPLER_VERSION_MAJOR "${POPPLER_CONFIG_H}")
string(REGEX REPLACE "^.*POPPLER_VERSION \"[0-9]+\\.([0-9]+).*$" "\\1" POPPLER_VERSION_MINOR "${POPPLER_CONFIG_H}")
string(REGEX REPLACE "^.*POPPLER_VERSION \"[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1" POPPLER_VERSION_PATCH "${POPPLER_CONFIG_H}")
set(POPPLER_VERSION_STRING "${POPPLER_VERSION_MAJOR}.${POPPLER_VERSION_MINOR}.${POPPLER_VERSION_PATCH}")
ENDIF ()
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Poppler REQUIRED_VARS POPPLER_LIBRARIES POPPLER_QT_INCLUDE_DIR VERSION_VAR POPPLER_VERSION_STRING )
# show the POPPLER_(XPDF/QT4)_INCLUDE_DIR and POPPLER_LIBRARIES variables only in the advanced view
MARK_AS_ADVANCED(POPPLER_XPDF_INCLUDE_DIR POPPLER_QT_INCLUDE_DIR POPPLER_BASE_LIBRARIES POPPLER_LIBRARIES)
# - Try to find Synctex
# Once done this will define
#
# SYNCTEX_FOUND - system has SyncTeX
# SYNCTEX_INCLUDE_DIR - the SyncTeX include directory
# SYNCTEX_LIBRARIES - Link these to use SyncTeX
# SYNCTEX_VERSION_MAJOR, SYNCTEX_VERSION_MINOR, SYNCTEX_VERSION_PATCH,
# SYNCTEX_VERSION_STRING - SyncTeX version information
#
# Redistribution and use of this file is allowed according to the terms of the
# MIT license. For details see the file COPYING-CMAKE-MODULES.
if ( SYNCTEX_INCLUDE_DIR AND SYNCTEX_LIBRARIES )
# in cache already
SET(Synctex_FIND_QUIETLY TRUE)
endif ( SYNCTEX_INCLUDE_DIR AND SYNCTEX_LIBRARIES )
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
if( NOT WIN32 )
find_package(PkgConfig)
pkg_check_modules(SYNCTEX_PKG QUIET synctex)
endif( NOT WIN32 )
FIND_PATH(SYNCTEX_INCLUDE_DIR NAMES synctex_parser.h
PATHS
/usr/local/include/synctex_parser
/usr/X11/include/synctex_parser
/usr/include/synctex_parser
HINTS
${SYNCTEX_PKG_INCLUDE_DIRS} # Generated by pkg-config
)
FIND_LIBRARY(SYNCTEX_LIBRARIES NAMES synctex ${SYNCTEX_PKG_LIBRARIES}
PATHS
/usr/local
/usr/X11
/usr
HINTS
${SYNCTEX_PKG_LIBRARY_DIRS} # Generated by pkg-config
PATH_SUFFIXES