[poppler] CMakeLists.txt cmake/modules glib/CMakeLists.txt
Albert Astals Cid
aacid at kemper.freedesktop.org
Wed Jan 7 14:33:50 PST 2009
CMakeLists.txt | 4 -
cmake/modules/FindFreetype.cmake | 74 ----------------------
cmake/modules/FindPackageHandleStandardArgs.cmake | 58 -----------------
glib/CMakeLists.txt | 2
4 files changed, 3 insertions(+), 135 deletions(-)
New commits:
commit 0e6420ece2d6fcc046d5814b48a2754fb86771e2
Author: Albert Astals Cid <aacid at kde.org>
Date: Wed Jan 7 23:33:02 2009 +0100
Require cmake 2.6.0, remove two cmake files provided upstream
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a8712a2..6529483 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,6 @@
project(poppler)
-cmake_minimum_required(VERSION 2.4.0 FATAL_ERROR)
+cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
@@ -84,7 +84,7 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/poppler
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}/poppler
- ${FREETYPE_INCLUDE_DIR}
+ ${FREETYPE_INCLUDE_DIRS}
)
set(HAVE_FREETYPE_H ON)
diff --git a/cmake/modules/FindFreetype.cmake b/cmake/modules/FindFreetype.cmake
deleted file mode 100644
index 66198b9..0000000
--- a/cmake/modules/FindFreetype.cmake
+++ /dev/null
@@ -1,74 +0,0 @@
-# - Try to find the freetype library
-# Once done this will define
-#
-# FREETYPE_FOUND - system has Freetype
-# FREETYPE_INCLUDE_DIRS - the FREETYPE include directories
-# FREETYPE_LIBRARIES - Link these to use FREETYPE
-# FREETYPE_INCLUDE_DIR is internal and deprecated for use
-
-# Copyright (c) 2006, Laurent Montel, <montel at kde.org>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-
-if (FREETYPE_LIBRARIES AND FREETYPE_INCLUDE_DIR)
-
- # in cache already
- set(FREETYPE_FOUND TRUE)
-
-else (FREETYPE_LIBRARIES AND FREETYPE_INCLUDE_DIR)
-
- FIND_PROGRAM(FREETYPECONFIG_EXECUTABLE NAMES freetype-config PATHS
- /opt/local/bin
- )
-
- #reset vars
- set(FREETYPE_LIBRARIES)
- set(FREETYPE_INCLUDE_DIR)
-
- # if freetype-config has been found
- if(FREETYPECONFIG_EXECUTABLE)
-
- EXEC_PROGRAM(${FREETYPECONFIG_EXECUTABLE} ARGS --libs RETURN_VALUE _return_VALUE OUTPUT_VARIABLE FREETYPE_LIBRARIES)
-
- EXEC_PROGRAM(${FREETYPECONFIG_EXECUTABLE} ARGS --cflags RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _freetype_pkgconfig_output)
- if(FREETYPE_LIBRARIES AND _freetype_pkgconfig_output)
- set(FREETYPE_FOUND TRUE)
-
- # freetype-config can print out more than one -I, so we need to chop it up
- # into a list and process each entry separately
- SEPARATE_ARGUMENTS(_freetype_pkgconfig_output)
- FOREACH(value ${_freetype_pkgconfig_output})
- STRING(REGEX REPLACE "-I(.+)" "\\1" value "${value}")
- set(FREETYPE_INCLUDE_DIR ${FREETYPE_INCLUDE_DIR} ${value})
- ENDFOREACH(value)
- endif(FREETYPE_LIBRARIES AND _freetype_pkgconfig_output)
-
- MARK_AS_ADVANCED(FREETYPE_LIBRARIES FREETYPE_INCLUDE_DIR)
-
- set( FREETYPE_LIBRARIES ${FREETYPE_LIBRARIES} CACHE INTERNAL "The libraries for freetype" )
-
- else(FREETYPECONFIG_EXECUTABLE)
- find_path (FREETYPE_INCLUDE_DIR freetype2/freetype/freetype.h)
- set (FREETYPE_INCLUDE_DIR ${FREETYPE_INCLUDE_DIR}/freetype2)
- find_library(FREETYPE_LIBRARIES freetype)
- if(FREETYPE_INCLUDE_DIR AND FREETYPE_LIBRARIES)
- set(FREETYPE_FOUND TRUE)
- endif(FREETYPE_INCLUDE_DIR AND FREETYPE_LIBRARIES)
- endif(FREETYPECONFIG_EXECUTABLE)
-
-
- IF (FREETYPE_FOUND)
- IF (NOT Freetype_FIND_QUIETLY)
- MESSAGE(STATUS "Found Freetype: ${FREETYPE_LIBRARIES}")
- ENDIF (NOT Freetype_FIND_QUIETLY)
- ELSE (FREETYPE_FOUND)
- IF (Freetype_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR "Could not find FreeType library")
- ENDIF (Freetype_FIND_REQUIRED)
- ENDIF (FREETYPE_FOUND)
-
-endif (FREETYPE_LIBRARIES AND FREETYPE_INCLUDE_DIR)
-
-set(FREETYPE_INCLUDE_DIRS ${FREETYPE_INCLUDE_DIR})
diff --git a/cmake/modules/FindPackageHandleStandardArgs.cmake b/cmake/modules/FindPackageHandleStandardArgs.cmake
deleted file mode 100644
index 151d812..0000000
--- a/cmake/modules/FindPackageHandleStandardArgs.cmake
+++ /dev/null
@@ -1,58 +0,0 @@
-# FIND_PACKAGE_HANDLE_STANDARD_ARGS(NAME (DEFAULT_MSG|"Custom failure message") VAR1 ... )
-# This macro is intended to be used in FindXXX.cmake modules files.
-# It handles the REQUIRED and QUIET argument to FIND_PACKAGE() and
-# it also sets the <UPPERCASED_NAME>_FOUND variable.
-# The package is found if all variables listed are TRUE.
-# Example:
-#
-# FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 DEFAULT_MSG LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
-#
-# LibXml2 is considered to be found, if both LIBXML2_LIBRARIES and
-# LIBXML2_INCLUDE_DIR are valid. Then also LIBXML2_FOUND is set to TRUE.
-# If it is not found and REQUIRED was used, it fails with FATAL_ERROR,
-# independent whether QUIET was used or not.
-# If it is found, the location is reported using the VAR1 argument, so
-# here a message "Found LibXml2: /usr/lib/libxml2.so" will be printed out.
-# If the second argument is DEFAULT_MSG, the message in the failure case will
-# be "Could NOT find LibXml2", if you don't like this message you can specify
-# your own custom failure message there.
-
-MACRO(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FAIL_MSG _VAR1 )
-
- IF("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG")
- IF (${_NAME}_FIND_REQUIRED)
- SET(_FAIL_MESSAGE "Could not find REQUIRED package ${_NAME}")
- ELSE (${_NAME}_FIND_REQUIRED)
- SET(_FAIL_MESSAGE "Could not find OPTIONAL package ${_NAME}")
- ENDIF (${_NAME}_FIND_REQUIRED)
- ELSE("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG")
- SET(_FAIL_MESSAGE "${_FAIL_MSG}")
- ENDIF("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG")
-
- STRING(TOUPPER ${_NAME} _NAME_UPPER)
-
- SET(${_NAME_UPPER}_FOUND TRUE)
- IF(NOT ${_VAR1})
- SET(${_NAME_UPPER}_FOUND FALSE)
- ENDIF(NOT ${_VAR1})
-
- FOREACH(_CURRENT_VAR ${ARGN})
- IF(NOT ${_CURRENT_VAR})
- SET(${_NAME_UPPER}_FOUND FALSE)
- ENDIF(NOT ${_CURRENT_VAR})
- ENDFOREACH(_CURRENT_VAR)
-
- IF (${_NAME_UPPER}_FOUND)
- IF (NOT ${_NAME}_FIND_QUIETLY)
- MESSAGE(STATUS "Found ${_NAME}: ${${_VAR1}}")
- ENDIF (NOT ${_NAME}_FIND_QUIETLY)
- ELSE (${_NAME_UPPER}_FOUND)
- IF (${_NAME}_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR "${_FAIL_MESSAGE}")
- ELSE (${_NAME}_FIND_REQUIRED)
- IF (NOT ${_NAME}_FIND_QUIETLY)
- MESSAGE(STATUS "${_FAIL_MESSAGE}")
- ENDIF (NOT ${_NAME}_FIND_QUIETLY)
- ENDIF (${_NAME}_FIND_REQUIRED)
- ENDIF (${_NAME_UPPER}_FOUND)
-ENDMACRO(FIND_PACKAGE_HANDLE_STANDARD_ARGS)
diff --git a/glib/CMakeLists.txt b/glib/CMakeLists.txt
index df0fd48..5d33a91 100644
--- a/glib/CMakeLists.txt
+++ b/glib/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_definitions(-DG_LOG_DOMAIN=\\"Poppler\\" ${GLIB2_CFLAGS})
+add_definitions(-DG_LOG_DOMAIN=\"Poppler\" ${GLIB2_CFLAGS})
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
More information about the poppler
mailing list