diff options
Diffstat (limited to 'Build/source/libs/gd/libgd-src/cmake')
17 files changed, 188 insertions, 904 deletions
diff --git a/Build/source/libs/gd/libgd-src/cmake/modules/AC_HEADER_STDC.cmake b/Build/source/libs/gd/libgd-src/cmake/modules/AC_HEADER_STDC.cmake index d3775ea3013..fafc76beb96 100644 --- a/Build/source/libs/gd/libgd-src/cmake/modules/AC_HEADER_STDC.cmake +++ b/Build/source/libs/gd/libgd-src/cmake/modules/AC_HEADER_STDC.cmake @@ -1,13 +1,8 @@ # Keep in sync with AC_CHECK_HEADERS in configure.ac. check_include_files(dirent.h HAVE_DIRENT_H) -check_include_files(errno.h HAVE_ERRNO_H) check_include_files(inttypes.h HAVE_INTTYPES_H) -check_include_files(limits.h HAVE_LIMITS_H) -check_include_files(stddef.h HAVE_STDDEF_H) check_include_files(stdint.h HAVE_STDINT_H) -check_include_files(stdlib.h HAVE_STDLIB_H) -check_include_files(string.h HAVE_STRING_H) check_include_files(strings.h HAVE_STRINGS_H) check_include_files(unistd.h HAVE_UNISTD_H) diff --git a/Build/source/libs/gd/libgd-src/cmake/modules/CMakeParseArguments.cmake b/Build/source/libs/gd/libgd-src/cmake/modules/CMakeParseArguments.cmake deleted file mode 100644 index b57b0296d3f..00000000000 --- a/Build/source/libs/gd/libgd-src/cmake/modules/CMakeParseArguments.cmake +++ /dev/null @@ -1,156 +0,0 @@ -# CMAKE_PARSE_ARGUMENTS(<prefix> <options> <one_value_keywords> <multi_value_keywords> args...) -# -# CMAKE_PARSE_ARGUMENTS() is intended to be used in macros or functions for -# parsing the arguments given to that macro or function. -# It processes the arguments and defines a set of variables which hold the -# values of the respective options. -# -# The <options> argument contains all options for the respective macro, -# i.e. keywords which can be used when calling the macro without any value -# following, like e.g. the OPTIONAL keyword of the install() command. -# -# The <one_value_keywords> argument contains all keywords for this macro -# which are followed by one value, like e.g. DESTINATION keyword of the -# install() command. -# -# The <multi_value_keywords> argument contains all keywords for this macro -# which can be followed by more than one value, like e.g. the TARGETS or -# FILES keywords of the install() command. -# -# When done, CMAKE_PARSE_ARGUMENTS() will have defined for each of the -# keywords listed in <options>, <one_value_keywords> and -# <multi_value_keywords> a variable composed of the given <prefix> -# followed by "_" and the name of the respective keyword. -# These variables will then hold the respective value from the argument list. -# For the <options> keywords this will be TRUE or FALSE. -# -# All remaining arguments are collected in a variable -# <prefix>_UNPARSED_ARGUMENTS, this can be checked afterwards to see whether -# your macro was called with unrecognized parameters. -# -# As an example here a my_install() macro, which takes similar arguments as the -# real install() command: -# -# function(MY_INSTALL) -# set(options OPTIONAL FAST) -# set(oneValueArgs DESTINATION RENAME) -# set(multiValueArgs TARGETS CONFIGURATIONS) -# cmake_parse_arguments(MY_INSTALL "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} ) -# ... -# -# Assume my_install() has been called like this: -# my_install(TARGETS foo bar DESTINATION bin OPTIONAL blub) -# -# After the cmake_parse_arguments() call the macro will have set the following -# variables: -# MY_INSTALL_OPTIONAL = TRUE -# MY_INSTALL_FAST = FALSE (this option was not used when calling my_install() -# MY_INSTALL_DESTINATION = "bin" -# MY_INSTALL_RENAME = "" (was not used) -# MY_INSTALL_TARGETS = "foo;bar" -# MY_INSTALL_CONFIGURATIONS = "" (was not used) -# MY_INSTALL_UNPARSED_ARGUMENTS = "blub" (no value expected after "OPTIONAL" -# -# You can the continue and process these variables. -# -# Keywords terminate lists of values, e.g. if directly after a one_value_keyword -# another recognized keyword follows, this is interpreted as the beginning of -# the new option. -# E.g. my_install(TARGETS foo DESTINATION OPTIONAL) would result in -# MY_INSTALL_DESTINATION set to "OPTIONAL", but MY_INSTALL_DESTINATION would -# be empty and MY_INSTALL_OPTIONAL would be set to TRUE therefor. - -#============================================================================= -# Copyright 2010 Alexander Neundorf <neundorf@kde.org> -# -# 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. -# -# * The names of Kitware, Inc., the Insight Consortium, or the names of -# any consortium members, or of any contributors, may not be used to -# endorse or promote products derived from this software without -# specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER 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 AUTHORS 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. -#============================================================================= - - -if(__CMAKE_PARSE_ARGUMENTS_INCLUDED) - return() -endif() -set(__CMAKE_PARSE_ARGUMENTS_INCLUDED TRUE) - - -function(CMAKE_PARSE_ARGUMENTS prefix _optionNames _singleArgNames _multiArgNames) - # first set all result variables to empty/FALSE - foreach(arg_name ${_singleArgNames} ${_multiArgNames}) - set(${prefix}_${arg_name}) - endforeach() - - foreach(option ${_optionNames}) - set(${prefix}_${option} FALSE) - endforeach() - - set(${prefix}_UNPARSED_ARGUMENTS) - - set(insideValues FALSE) - set(currentArgName) - - # now iterate over all arguments and fill the result variables - foreach(currentArg ${ARGN}) - list(FIND _optionNames "${currentArg}" optionIndex) # ... then this marks the end of the arguments belonging to this keyword - list(FIND _singleArgNames "${currentArg}" singleArgIndex) # ... then this marks the end of the arguments belonging to this keyword - list(FIND _multiArgNames "${currentArg}" multiArgIndex) # ... then this marks the end of the arguments belonging to this keyword - - if(${optionIndex} EQUAL -1 AND ${singleArgIndex} EQUAL -1 AND ${multiArgIndex} EQUAL -1) - if(insideValues) - if("${insideValues}" STREQUAL "SINGLE") - set(${prefix}_${currentArgName} ${currentArg}) - set(insideValues FALSE) - elseif("${insideValues}" STREQUAL "MULTI") - list(APPEND ${prefix}_${currentArgName} ${currentArg}) - endif() - else() - list(APPEND ${prefix}_UNPARSED_ARGUMENTS ${currentArg}) - endif() - else() - if(NOT ${optionIndex} EQUAL -1) - set(${prefix}_${currentArg} TRUE) - set(insideValues FALSE) - elseif(NOT ${singleArgIndex} EQUAL -1) - set(currentArgName ${currentArg}) - set(${prefix}_${currentArgName}) - set(insideValues "SINGLE") - elseif(NOT ${multiArgIndex} EQUAL -1) - set(currentArgName ${currentArg}) - set(${prefix}_${currentArgName}) - set(insideValues "MULTI") - endif() - endif() - - endforeach() - - # propagate the result variables to the caller: - foreach(arg_name ${_singleArgNames} ${_multiArgNames} ${_optionNames}) - set(${prefix}_${arg_name} ${${prefix}_${arg_name}} PARENT_SCOPE) - endforeach() - set(${prefix}_UNPARSED_ARGUMENTS ${${prefix}_UNPARSED_ARGUMENTS} PARENT_SCOPE) - -endfunction() diff --git a/Build/source/libs/gd/libgd-src/cmake/modules/CheckDIRSymbolExists.cmake b/Build/source/libs/gd/libgd-src/cmake/modules/CheckDIRSymbolExists.cmake index dde6c7f3af8..fd71e7f5e32 100644 --- a/Build/source/libs/gd/libgd-src/cmake/modules/CheckDIRSymbolExists.cmake +++ b/Build/source/libs/gd/libgd-src/cmake/modules/CheckDIRSymbolExists.cmake @@ -7,16 +7,16 @@ # # * 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. -# +# # * The names of Kitware, Inc., the Insight Consortium, or the names of # any consortium members, or of any contributors, may not be used to # endorse or promote products derived from this software without # specific prior written permission. -# +# # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER 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 @@ -39,7 +39,7 @@ # the AC_HEADER_DIRENT test programme rather than the CheckSymbolExists.cmake # test programme which always fails since DIR tends to be typedef'd # rather than #define'd. -# +# # The following variables may be set before calling this macro to # modify the way the check is run: # @@ -53,7 +53,7 @@ MACRO(CHECK_DIRSYMBOL_EXISTS FILES VARIABLE) SET(CMAKE_CONFIGURABLE_FILE_CONTENT "/* */\n") SET(MACRO_CHECK_DIRSYMBOL_EXISTS_FLAGS ${CMAKE_REQUIRED_FLAGS}) IF(CMAKE_REQUIRED_LIBRARIES) - SET(CHECK_DIRSYMBOL_EXISTS_LIBS + SET(CHECK_DIRSYMBOL_EXISTS_LIBS "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") ELSE(CMAKE_REQUIRED_LIBRARIES) SET(CHECK_DIRSYMBOL_EXISTS_LIBS) @@ -79,7 +79,7 @@ MACRO(CHECK_DIRSYMBOL_EXISTS FILES VARIABLE) ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckDIRSymbolExists.c COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} - CMAKE_FLAGS + CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_DIRSYMBOL_EXISTS_FLAGS} "${CHECK_DIRSYMBOL_EXISTS_LIBS}" "${CMAKE_DIRSYMBOL_EXISTS_INCLUDES}" @@ -87,7 +87,7 @@ MACRO(CHECK_DIRSYMBOL_EXISTS FILES VARIABLE) IF(${VARIABLE}) MESSAGE(STATUS "Looking for DIR in ${FILES} - found") SET(${VARIABLE} 1 CACHE INTERNAL "Have symbol DIR") - FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log "Determining if the DIR symbol is defined as in AC_HEADER_DIRENT " "passed with the following output:\n" "${OUTPUT}\nFile ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckDIRSymbolExists.c:\n" @@ -95,7 +95,7 @@ MACRO(CHECK_DIRSYMBOL_EXISTS FILES VARIABLE) ELSE(${VARIABLE}) MESSAGE(STATUS "Looking for DIR in ${FILES} - not found.") SET(${VARIABLE} "" CACHE INTERNAL "Have symbol DIR") - FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Determining if the DIR symbol is defined as in AC_HEADER_DIRENT " "failed with the following output:\n" "${OUTPUT}\nFile ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckDIRSymbolExists.c:\n" diff --git a/Build/source/libs/gd/libgd-src/cmake/modules/CheckPrototypeExists.cmake b/Build/source/libs/gd/libgd-src/cmake/modules/CheckPrototypeExists.cmake index 85a171758bc..191615c6fba 100644 --- a/Build/source/libs/gd/libgd-src/cmake/modules/CheckPrototypeExists.cmake +++ b/Build/source/libs/gd/libgd-src/cmake/modules/CheckPrototypeExists.cmake @@ -7,16 +7,16 @@ # # * 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. -# +# # * The names of Kitware, Inc., the Insight Consortium, or the names of # any consortium members, or of any contributors, may not be used to # endorse or promote products derived from this software without # specific prior written permission. -# +# # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER 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 @@ -66,4 +66,3 @@ int main() ") CHECK_CXX_SOURCE_COMPILES("${_CHECK_PROTO_EXISTS_SOURCE_CODE}" ${_RESULT}) ENDMACRO(CHECK_PROTOTYPE_EXISTS _SYMBOL _HEADER _RESULT) - diff --git a/Build/source/libs/gd/libgd-src/cmake/modules/FindFontConfig.cmake b/Build/source/libs/gd/libgd-src/cmake/modules/FindFontConfig.cmake index 23d0020c52e..afe967eb6a9 100644 --- a/Build/source/libs/gd/libgd-src/cmake/modules/FindFontConfig.cmake +++ b/Build/source/libs/gd/libgd-src/cmake/modules/FindFontConfig.cmake @@ -1,17 +1,17 @@ # Copyright (c) 2006,2007 Laurent Montel, <montel@kde.org> -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: -# +# # 1. Redistributions of source code must retain the copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. -# 3. The name of the author may not be used to endorse or promote products +# 3. The name of the author may not be used to endorse or promote products # derived from this software without specific prior written permission. -# +# # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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. diff --git a/Build/source/libs/gd/libgd-src/cmake/modules/FindFreetype.cmake b/Build/source/libs/gd/libgd-src/cmake/modules/FindFreetype.cmake deleted file mode 100644 index dd4db279e0c..00000000000 --- a/Build/source/libs/gd/libgd-src/cmake/modules/FindFreetype.cmake +++ /dev/null @@ -1,128 +0,0 @@ -# - Locate FreeType library -# This module defines -# FREETYPE_LIBRARIES, the library to link against -# FREETYPE_FOUND, if false, do not try to link to FREETYPE -# FREETYPE_INCLUDE_DIRS, where to find headers. -# FREETYPE_VERSION_STRING, the version of freetype found (since CMake 2.8.8) -# This is the concatenation of the paths: -# FREETYPE_INCLUDE_DIR_ft2build -# FREETYPE_INCLUDE_DIR_freetype2 -# -# $FREETYPE_DIR is an environment variable that would -# correspond to the ./configure --prefix=$FREETYPE_DIR -# used in building FREETYPE. - -#============================================================================= -# Copyright 2007-2009 Kitware, Inc. -# -# 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. -# -# * The names of Kitware, Inc., the Insight Consortium, or the names of -# any consortium members, or of any contributors, may not be used to -# endorse or promote products derived from this software without -# specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER 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 AUTHORS 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. - -# Created by Eric Wing. -# Modifications by Alexander Neundorf. -# This file has been renamed to "FindFreetype.cmake" instead of the correct -# "FindFreeType.cmake" in order to be compatible with the one from KDE4, Alex. - -# Ugh, FreeType seems to use some #include trickery which -# makes this harder than it should be. It looks like they -# put ft2build.h in a common/easier-to-find location which -# then contains a #include to a more specific header in a -# more specific location (#include <freetype/config/ftheader.h>). -# Then from there, they need to set a bunch of #define's -# so you can do something like: -# #include FT_FREETYPE_H -# Unfortunately, using CMake's mechanisms like include_directories() -# wants explicit full paths and this trickery doesn't work too well. -# I'm going to attempt to cut out the middleman and hope -# everything still works. -find_path(FREETYPE_INCLUDE_DIR_ft2build ft2build.h - HINTS - ENV FREETYPE_DIR - PATHS - /usr/local/X11R6 - /usr/local/X11 - /usr/freeware - PATH_SUFFIXES include/freetype2 include -) - -find_path(FREETYPE_INCLUDE_DIR_freetype2 config/ftheader.h - HINTS - ENV FREETYPE_DIR - PATHS - /usr/local/X11R6 - /usr/local/X11 - /usr/freeware - PATH_SUFFIXES include/freetype2 include -) - -find_library(FREETYPE_LIBRARY - NAMES freetype libfreetype freetype219 freetype_a - HINTS - ENV FREETYPE_DIR - PATH_SUFFIXES lib - PATHS - /usr/local/X11R6 - /usr/local/X11 - /usr/freeware -) - -# set the user variables -if(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2) - set(FREETYPE_INCLUDE_DIRS "${FREETYPE_INCLUDE_DIR_ft2build};${FREETYPE_INCLUDE_DIR_freetype2}") -endif() -set(FREETYPE_LIBRARIES "${FREETYPE_LIBRARY}") - -if(FREETYPE_INCLUDE_DIR_freetype2 AND EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h") - file(STRINGS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h" freetype_version_str - REGEX "^#[\t ]*define[\t ]+FREETYPE_(MAJOR|MINOR|PATCH)[\t ]+[0-9]+$") - - unset(FREETYPE_VERSION_STRING) - foreach(VPART MAJOR MINOR PATCH) - foreach(VLINE ${freetype_version_str}) - if(VLINE MATCHES "^#[\t ]*define[\t ]+FREETYPE_${VPART}") - string(REGEX REPLACE "^#[\t ]*define[\t ]+FREETYPE_${VPART}[\t ]+([0-9]+)$" "\\1" - FREETYPE_VERSION_PART "${VLINE}") - if(FREETYPE_VERSION_STRING) - set(FREETYPE_VERSION_STRING "${FREETYPE_VERSION_STRING}.${FREETYPE_VERSION_PART}") - else() - set(FREETYPE_VERSION_STRING "${FREETYPE_VERSION_PART}") - endif() - unset(FREETYPE_VERSION_PART) - endif() - endforeach() - endforeach() -endif() - - -# handle the QUIETLY and REQUIRED arguments and set FREETYPE_FOUND to TRUE if -# all listed variables are TRUE -include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(Freetype - REQUIRED_VARS FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS - VERSION_VAR FREETYPE_VERSION_STRING) - -mark_as_advanced(FREETYPE_LIBRARY FREETYPE_INCLUDE_DIR_freetype2 FREETYPE_INCLUDE_DIR_ft2build) diff --git a/Build/source/libs/gd/libgd-src/cmake/modules/FindICONV.cmake b/Build/source/libs/gd/libgd-src/cmake/modules/FindICONV.cmake index 49d5f6b95a0..6973a56f6e9 100644 --- a/Build/source/libs/gd/libgd-src/cmake/modules/FindICONV.cmake +++ b/Build/source/libs/gd/libgd-src/cmake/modules/FindICONV.cmake @@ -1,11 +1,11 @@ -# - 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 +# - 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(CheckCCompilerFlag) include(CheckCSourceCompiles) @@ -14,13 +14,13 @@ IF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) SET(ICONV_FIND_QUIETLY TRUE) ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) -FIND_PATH(ICONV_INCLUDE_DIR iconv.h HINTS /sw/include/ PATHS /opt/local) - +FIND_PATH(ICONV_INCLUDE_DIR iconv.h HINTS /sw/include/ PATHS /opt/local) + FIND_LIBRARY(ICONV_LIBRARIES NAMES libiconv_a iconv libiconv c PATHS /opt/local) - -IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) - SET(ICONV_FOUND TRUE) -ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) + +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}) @@ -47,18 +47,18 @@ 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) +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 -)
\ No newline at end of file +) diff --git a/Build/source/libs/gd/libgd-src/cmake/modules/FindLIQ.cmake b/Build/source/libs/gd/libgd-src/cmake/modules/FindLIQ.cmake index bf17fcfc92e..4f730f09685 100644 --- a/Build/source/libs/gd/libgd-src/cmake/modules/FindLIQ.cmake +++ b/Build/source/libs/gd/libgd-src/cmake/modules/FindLIQ.cmake @@ -4,56 +4,30 @@ # This module defines # LIQ_INCLUDE_DIR, where to find libimagequant.h # LIQ_LIBRARIES, the libraries to link against to use libimagequant. -# LIQ_FOUND, If false, do not try to use libimagequant. +# LIQ_FOUND, if false, do not try to use libimagequant. SET(LIQ_FOUND "NO") FIND_PATH(LIQ_INCLUDE_DIR libimagequant.h -"${PROJECT_SOURCE_DIR}/libimagequant" -"${PROJECT_SOURCE_DIR}/pngquant/lib" -/usr/local/include -/usr/include + /usr/local/include + /usr/include ) FIND_LIBRARY(LIQ_LIBRARY NAMES libimagequant imagequant - PATHS "${PROJECT_SOURCE_DIR}/libimagequant" "${PROJECT_SOURCE_DIR}/pngquant/lib" /usr/lib64 /usr/lib /usr/local/lib + PATHS /usr/lib64 /usr/lib /usr/local/lib ) IF (LIQ_LIBRARY AND LIQ_INCLUDE_DIR) SET(LIQ_FOUND "YES") SET(LIQ_LIBRARIES ${LIQ_LIBRARY}) - SET(HAVE_LIBIMAGEQUANT 1) + SET(HAVE_LIBIMAGEQUANT 1) ENDIF (LIQ_LIBRARY AND LIQ_INCLUDE_DIR) IF (LIQ_FOUND) IF (NOT LIQ_FIND_QUIETLY) MESSAGE(STATUS "Found LIQ: ${LIQ_LIBRARY} ${LIQ_INCLUDE_DIR}") ENDIF (NOT LIQ_FIND_QUIETLY) -ELSE (LIQ_FOUND) - # if existing library not found, then download and build it - IF (NOT WIN32 OR CYGWIN OR MINGW) # MSVC's C compiler is too old to compile libimagequant - IF (CMAKE_VERSION VERSION_GREATER "2.8.1") - MESSAGE(STATUS "LIQ will be built") - INCLUDE(ExternalProject) - EXTERNALPROJECT_ADD( - libimagequant - URL "http://pngquant.org/libimagequant-2.0.0-src.tar.bz2" - SOURCE_DIR libimagequant - BUILD_IN_SOURCE 1 - INSTALL_DIR libimagequant - INSTALL_COMMAND true - CONFIGURE_COMMAND true - BUILD_COMMAND make static CFLAGSADD='-fPIC' - ) - - SET(LIQ_FOUND "SORTOF") - SET(LIQ_BUILD "YES") - SET(LIQ_LIBRARIES "${PROJECT_BINARY_DIR}/libimagequant/libimagequant.a") - SET(LIQ_INCLUDE_DIR "${PROJECT_BINARY_DIR}/libimagequant/") - SET(HAVE_LIBIMAGEQUANT 1) - ENDIF(CMAKE_VERSION VERSION_GREATER "2.8.1") - ENDIF(NOT WIN32 OR CYGWIN OR MINGW) ENDIF (LIQ_FOUND) MARK_AS_ADVANCED(LIQ_INCLUDE_DIR LIQ_LIBRARIES LIQ_BUILD) diff --git a/Build/source/libs/gd/libgd-src/cmake/modules/FindPNG.cmake b/Build/source/libs/gd/libgd-src/cmake/modules/FindPNG.cmake deleted file mode 100644 index a44affcfcc0..00000000000 --- a/Build/source/libs/gd/libgd-src/cmake/modules/FindPNG.cmake +++ /dev/null @@ -1,93 +0,0 @@ -# - Find the native PNG includes and library -# -# This module searches libpng, the library for working with PNG images. -# -# It defines the following variables -# PNG_INCLUDE_DIRS, where to find png.h, etc. -# PNG_LIBRARIES, the libraries to link against to use PNG. -# PNG_DEFINITIONS - You should add_definitons(${PNG_DEFINITIONS}) before compiling code that includes png library files. -# PNG_FOUND, If false, do not try to use PNG. -# PNG_VERSION_STRING - the version of the PNG library found (since CMake 2.8.8) -# Also defined, but not for general use are -# PNG_LIBRARY, where to find the PNG library. -# For backward compatiblity the variable PNG_INCLUDE_DIR is also set. It has the same value as PNG_INCLUDE_DIRS. -# -# Since PNG depends on the ZLib compression library, none of the above will be -# defined unless ZLib can be found. - -#============================================================================= -# Copyright 2002-2009 Kitware, Inc. -# -# -# 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. -# -# * The names of Kitware, Inc., the Insight Consortium, or the names of -# any consortium members, or of any contributors, may not be used to -# endorse or promote products derived from this software without -# specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER 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 AUTHORS 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. - -if(PNG_FIND_QUIETLY) - set(_FIND_ZLIB_ARG QUIET) -endif() -find_package(ZLIB ${_FIND_ZLIB_ARG}) - -if(ZLIB_FOUND) - find_path(PNG_PNG_INCLUDE_DIR png.h - /usr/local/include/libpng # OpenBSD - ) - - set(PNG_NAMES ${PNG_NAMES} png libpng png15 libpng15 png15d libpng15d png14 libpng14 png14d libpng14d png12 libpng12 png12d libpng12d libpng_a) - find_library(PNG_LIBRARY NAMES ${PNG_NAMES} ) - - if (PNG_LIBRARY AND PNG_PNG_INCLUDE_DIR) - # png.h includes zlib.h. Sigh. - set(PNG_INCLUDE_DIRS ${PNG_PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} ) - set(PNG_INCLUDE_DIR ${PNG_INCLUDE_DIRS} ) # for backward compatiblity - set(PNG_LIBRARIES ${PNG_LIBRARY} ${ZLIB_LIBRARY}) - - if (CYGWIN) - if(BUILD_SHARED_LIBS) - # No need to define PNG_USE_DLL here, because it's default for Cygwin. - else() - set (PNG_DEFINITIONS -DPNG_STATIC) - endif() - endif () - - endif () - - if (PNG_PNG_INCLUDE_DIR AND EXISTS "${PNG_PNG_INCLUDE_DIR}/png.h") - file(STRINGS "${PNG_PNG_INCLUDE_DIR}/png.h" png_version_str REGEX "^#define[ \t]+PNG_LIBPNG_VER_STRING[ \t]+\".+\"") - - string(REGEX REPLACE "^#define[ \t]+PNG_LIBPNG_VER_STRING[ \t]+\"([^\"]+)\".*" "\\1" PNG_VERSION_STRING "${png_version_str}") - unset(png_version_str) - endif () -endif() - -# handle the QUIETLY and REQUIRED arguments and set PNG_FOUND to TRUE if -# all listed variables are TRUE -include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) -find_package_handle_standard_args(PNG - REQUIRED_VARS PNG_LIBRARY PNG_PNG_INCLUDE_DIR - VERSION_VAR PNG_VERSION_STRING) - -mark_as_advanced(PNG_PNG_INCLUDE_DIR PNG_LIBRARY ) diff --git a/Build/source/libs/gd/libgd-src/cmake/modules/FindPTHREAD.cmake b/Build/source/libs/gd/libgd-src/cmake/modules/FindPTHREAD.cmake index 0627c6d0a44..0331e17562f 100644 --- a/Build/source/libs/gd/libgd-src/cmake/modules/FindPTHREAD.cmake +++ b/Build/source/libs/gd/libgd-src/cmake/modules/FindPTHREAD.cmake @@ -1,92 +1,90 @@ -#############################################################################
-#
-# $Id: FindPTHREAD.cmake 4056 2013-01-05 13:04:42Z fspindle $
-#
-# This file is part of the ViSP software.
-# Copyright (C) 2005 - 2013 by INRIA. All rights reserved.
-#
-# This software is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# ("GPL") version 2 as published by the Free Software Foundation.
-# See the file LICENSE.txt at the root directory of this source
-# distribution for additional information about the GNU GPL.
-#
-# For using ViSP with software that can not be combined with the GNU
-# GPL, please contact INRIA about acquiring a ViSP Professional
-# Edition License.
-#
-# See http://www.irisa.fr/lagadic/visp/visp.html for more information.
-#
-# This software was developed at:
-# INRIA Rennes - Bretagne Atlantique
-# Campus Universitaire de Beaulieu
-# 35042 Rennes Cedex
-# France
-# http://www.irisa.fr/lagadic
-#
-# If you have questions regarding the use of this file, please contact
-# INRIA at visp@inria.fr
-#
-# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-#
-# Description:
-# Try to find pthread library.
-# Once run this will define:
-#
-# PTHREAD_FOUND
-# PTHREAD_INCLUDE_DIRS
-# PTHREAD_LIBRARIES
-#
-# Authors:
-# Fabien Spindler
-#
-#############################################################################
-
-
- FIND_PATH(PTHREAD_INCLUDE_DIR pthread.h
- "$ENV{PTHREAD_HOME}/include"
- "$ENV{PTHREAD_DIR}/include"
- /usr/include
- "C:/MinGW/include"
- )
- #MESSAGE("DBG PTHREAD_INCLUDE_DIR=${PTHREAD_INCLUDE_DIR}")
-
- # pthreadVSE pthreadGCE pthreadGC pthreadVC1 pthreadVC2 are comming from web
- FIND_LIBRARY(PTHREAD_LIBRARY
- NAMES pthread pthreadGC2 pthreadVSE pthreadGCE pthreadGC pthreadVC1 pthreadVC2
- PATHS
- "$ENV{PTHREAD_HOME}/lib"
- "$ENV{PTHREAD_DIR}/lib"
- /usr/lib
- /usr/local/lib
- /lib
- "C:/MinGW/lib"
- )
-
- #MESSAGE(STATUS "DBG PTHREAD_LIBRARY=${PTHREAD_LIBRARY}")
-
- ## --------------------------------
-
- IF(PTHREAD_LIBRARY)
- SET(PTHREAD_LIBRARIES ${PTHREAD_LIBRARY})
- ELSE(PTHREAD_LIBRARY)
- #MESSAGE(SEND_ERROR "pthread library not found.")
- ENDIF(PTHREAD_LIBRARY)
-
- IF(NOT PTHREAD_INCLUDE_DIR)
- #MESSAGE(SEND_ERROR "pthread include dir not found.")
- ENDIF(NOT PTHREAD_INCLUDE_DIR)
-
- IF(PTHREAD_LIBRARIES AND PTHREAD_INCLUDE_DIR)
- SET(PTHREAD_INCLUDE_DIRS ${PTHREAD_INCLUDE_DIR})
- SET(PTHREAD_FOUND TRUE)
- ELSE(PTHREAD_LIBRARIES AND PTHREAD_INCLUDE_DIR)
- SET(PTHREAD_FOUND FALSE)
- ENDIF(PTHREAD_LIBRARIES AND PTHREAD_INCLUDE_DIR)
-
- MARK_AS_ADVANCED(
- PTHREAD_INCLUDE_DIR
- PTHREAD_LIBRARY
- )
- #MESSAGE(STATUS "PTHREAD_FOUND : ${PTHREAD_FOUND}")
+############################################################################# +# +# This file is part of the ViSP software. +# Copyright (C) 2005 - 2013 by INRIA. All rights reserved. +# +# This software is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# ("GPL") version 2 as published by the Free Software Foundation. +# See the file LICENSE.txt at the root directory of this source +# distribution for additional information about the GNU GPL. +# +# For using ViSP with software that can not be combined with the GNU +# GPL, please contact INRIA about acquiring a ViSP Professional +# Edition License. +# +# See http://www.irisa.fr/lagadic/visp/visp.html for more information. +# +# This software was developed at: +# INRIA Rennes - Bretagne Atlantique +# Campus Universitaire de Beaulieu +# 35042 Rennes Cedex +# France +# http://www.irisa.fr/lagadic +# +# If you have questions regarding the use of this file, please contact +# INRIA at visp@inria.fr +# +# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +# +# Description: +# Try to find pthread library. +# Once run this will define: +# +# PTHREAD_FOUND +# PTHREAD_INCLUDE_DIRS +# PTHREAD_LIBRARIES +# +# Authors: +# Fabien Spindler +# +############################################################################# + + + FIND_PATH(PTHREAD_INCLUDE_DIR pthread.h + "$ENV{PTHREAD_HOME}/include" + "$ENV{PTHREAD_DIR}/include" + /usr/include + "C:/MinGW/include" + ) + #MESSAGE("DBG PTHREAD_INCLUDE_DIR=${PTHREAD_INCLUDE_DIR}") + + # pthreadVSE pthreadGCE pthreadGC pthreadVC1 pthreadVC2 are comming from web + FIND_LIBRARY(PTHREAD_LIBRARY + NAMES pthread pthreadGC2 pthreadVSE pthreadGCE pthreadGC pthreadVC1 pthreadVC2 + PATHS + "$ENV{PTHREAD_HOME}/lib" + "$ENV{PTHREAD_DIR}/lib" + /usr/lib + /usr/local/lib + /lib + "C:/MinGW/lib" + ) + + #MESSAGE(STATUS "DBG PTHREAD_LIBRARY=${PTHREAD_LIBRARY}") + + ## -------------------------------- + + IF(PTHREAD_LIBRARY) + SET(PTHREAD_LIBRARIES ${PTHREAD_LIBRARY}) + ELSE(PTHREAD_LIBRARY) + #MESSAGE(SEND_ERROR "pthread library not found.") + ENDIF(PTHREAD_LIBRARY) + + IF(NOT PTHREAD_INCLUDE_DIR) + #MESSAGE(SEND_ERROR "pthread include dir not found.") + ENDIF(NOT PTHREAD_INCLUDE_DIR) + + IF(PTHREAD_LIBRARIES AND PTHREAD_INCLUDE_DIR) + SET(PTHREAD_INCLUDE_DIRS ${PTHREAD_INCLUDE_DIR}) + SET(PTHREAD_FOUND TRUE) + ELSE(PTHREAD_LIBRARIES AND PTHREAD_INCLUDE_DIR) + SET(PTHREAD_FOUND FALSE) + ENDIF(PTHREAD_LIBRARIES AND PTHREAD_INCLUDE_DIR) + + MARK_AS_ADVANCED( + PTHREAD_INCLUDE_DIR + PTHREAD_LIBRARY + ) + #MESSAGE(STATUS "PTHREAD_FOUND : ${PTHREAD_FOUND}") diff --git a/Build/source/libs/gd/libgd-src/cmake/modules/FindPackageHandleStandardArgs.cmake b/Build/source/libs/gd/libgd-src/cmake/modules/FindPackageHandleStandardArgs.cmake deleted file mode 100644 index de124acce43..00000000000 --- a/Build/source/libs/gd/libgd-src/cmake/modules/FindPackageHandleStandardArgs.cmake +++ /dev/null @@ -1,317 +0,0 @@ -# FIND_PACKAGE_HANDLE_STANDARD_ARGS(<name> ... ) -# -# This function is intended to be used in FindXXX.cmake modules files. -# It handles the REQUIRED, QUIET and version-related arguments to find_package(). -# It also sets the <UPPERCASED_NAME>_FOUND variable. -# The package is considered found if all variables <var1>... listed contain -# valid results, e.g. valid filepaths. -# -# There are two modes of this function. The first argument in both modes is -# the name of the Find-module where it is called (in original casing). -# -# The first simple mode looks like this: -# FIND_PACKAGE_HANDLE_STANDARD_ARGS(<name> (DEFAULT_MSG|"Custom failure message") <var1>...<varN> ) -# If the variables <var1> to <varN> are all valid, then <UPPERCASED_NAME>_FOUND -# will be set to TRUE. -# If DEFAULT_MSG is given as second argument, then the function will generate -# itself useful success and error messages. You can also supply a custom error message -# for the failure case. This is not recommended. -# -# The second mode is more powerful and also supports version checking: -# FIND_PACKAGE_HANDLE_STANDARD_ARGS(NAME [REQUIRED_VARS <var1>...<varN>] -# [VERSION_VAR <versionvar>] -# [HANDLE_COMPONENTS] -# [CONFIG_MODE] -# [FAIL_MESSAGE "Custom failure message"] ) -# -# As above, if <var1> through <varN> are all valid, <UPPERCASED_NAME>_FOUND -# will be set to TRUE. -# After REQUIRED_VARS the variables which are required for this package are listed. -# Following VERSION_VAR the name of the variable can be specified which holds -# the version of the package which has been found. If this is done, this version -# will be checked against the (potentially) specified required version used -# in the find_package() call. The EXACT keyword is also handled. The default -# messages include information about the required version and the version -# which has been actually found, both if the version is ok or not. -# If the package supports components, use the HANDLE_COMPONENTS option to enable -# handling them. In this case, find_package_handle_standard_args() will report -# which components have been found and which are missing, and the <NAME>_FOUND -# variable will be set to FALSE if any of the required components (i.e. not the -# ones listed after OPTIONAL_COMPONENTS) are missing. -# Use the option CONFIG_MODE if your FindXXX.cmake module is a wrapper for -# a find_package(... NO_MODULE) call. In this case VERSION_VAR will be set -# to <NAME>_VERSION and the macro will automatically check whether the -# Config module was found. -# Via FAIL_MESSAGE a custom failure message can be specified, if this is not -# used, the default message will be displayed. -# -# Example for mode 1: -# -# FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 DEFAULT_MSG LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR) -# -# LibXml2 is considered to be found, if both LIBXML2_LIBRARY 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, success will be reported, including the content of <var1>. -# On repeated Cmake runs, the same message won't be printed again. -# -# Example for mode 2: -# -# FIND_PACKAGE_HANDLE_STANDARD_ARGS(BISON REQUIRED_VARS BISON_EXECUTABLE -# VERSION_VAR BISON_VERSION) -# In this case, BISON is considered to be found if the variable(s) listed -# after REQUIRED_VAR are all valid, i.e. BISON_EXECUTABLE in this case. -# Also the version of BISON will be checked by using the version contained -# in BISON_VERSION. -# Since no FAIL_MESSAGE is given, the default messages will be printed. -# -# Another example for mode 2: -# -# find_package(Automoc4 QUIET NO_MODULE HINTS /opt/automoc4) -# FIND_PACKAGE_HANDLE_STANDARD_ARGS(Automoc4 CONFIG_MODE) -# In this case, FindAutmoc4.cmake wraps a call to find_package(Automoc4 NO_MODULE) -# and adds an additional search directory for automoc4. -# The following FIND_PACKAGE_HANDLE_STANDARD_ARGS() call produces a proper -# success/error message. - -#============================================================================= -# Copyright 2007-2009 Kitware, Inc. -# -# -# 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. -# -# * The names of Kitware, Inc., the Insight Consortium, or the names of -# any consortium members, or of any contributors, may not be used to -# endorse or promote products derived from this software without -# specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER 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 AUTHORS 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. - -include(FindPackageMessage) -include(CMakeParseArguments) - -# internal helper macro -macro(_FPHSA_FAILURE_MESSAGE _msg) - if (${_NAME}_FIND_REQUIRED) - message(FATAL_ERROR "${_msg}") - else () - if (NOT ${_NAME}_FIND_QUIETLY) - message(STATUS "${_msg}") - endif () - endif () -endmacro() - - -# internal helper macro to generate the failure message when used in CONFIG_MODE: -macro(_FPHSA_HANDLE_FAILURE_CONFIG_MODE) - # <name>_CONFIG is set, but FOUND is false, this means that some other of the REQUIRED_VARS was not found: - if(${_NAME}_CONFIG) - _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: missing: ${MISSING_VARS} (found ${${_NAME}_CONFIG} ${VERSION_MSG})") - else() - # If _CONSIDERED_CONFIGS is set, the config-file has been found, but no suitable version. - # List them all in the error message: - if(${_NAME}_CONSIDERED_CONFIGS) - set(configsText "") - list(LENGTH ${_NAME}_CONSIDERED_CONFIGS configsCount) - math(EXPR configsCount "${configsCount} - 1") - foreach(currentConfigIndex RANGE ${configsCount}) - list(GET ${_NAME}_CONSIDERED_CONFIGS ${currentConfigIndex} filename) - list(GET ${_NAME}_CONSIDERED_VERSIONS ${currentConfigIndex} version) - set(configsText "${configsText} ${filename} (version ${version})\n") - endforeach() - if (${_NAME}_NOT_FOUND_MESSAGE) - set(configsText "${configsText} Reason given by package: ${${_NAME}_NOT_FOUND_MESSAGE}\n") - endif() - _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} ${VERSION_MSG}, checked the following files:\n${configsText}") - - else() - # Simple case: No Config-file was found at all: - _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: found neither ${_NAME}Config.cmake nor ${_NAME_LOWER}-config.cmake ${VERSION_MSG}") - endif() - endif() -endmacro() - - -function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG) - -# set up the arguments for CMAKE_PARSE_ARGUMENTS and check whether we are in -# new extended or in the "old" mode: - set(options CONFIG_MODE HANDLE_COMPONENTS) - set(oneValueArgs FAIL_MESSAGE VERSION_VAR) - set(multiValueArgs REQUIRED_VARS) - set(_KEYWORDS_FOR_EXTENDED_MODE ${options} ${oneValueArgs} ${multiValueArgs} ) - list(FIND _KEYWORDS_FOR_EXTENDED_MODE "${_FIRST_ARG}" INDEX) - - if(${INDEX} EQUAL -1) - set(FPHSA_FAIL_MESSAGE ${_FIRST_ARG}) - set(FPHSA_REQUIRED_VARS ${ARGN}) - set(FPHSA_VERSION_VAR) - else() - - CMAKE_PARSE_ARGUMENTS(FPHSA "${options}" "${oneValueArgs}" "${multiValueArgs}" ${_FIRST_ARG} ${ARGN}) - - if(FPHSA_UNPARSED_ARGUMENTS) - message(FATAL_ERROR "Unknown keywords given to FIND_PACKAGE_HANDLE_STANDARD_ARGS(): \"${FPHSA_UNPARSED_ARGUMENTS}\"") - endif() - - if(NOT FPHSA_FAIL_MESSAGE) - set(FPHSA_FAIL_MESSAGE "DEFAULT_MSG") - endif() - endif() - -# now that we collected all arguments, process them - - if("${FPHSA_FAIL_MESSAGE}" STREQUAL "DEFAULT_MSG") - set(FPHSA_FAIL_MESSAGE "Could NOT find ${_NAME}") - endif() - - # In config-mode, we rely on the variable <package>_CONFIG, which is set by find_package() - # when it successfully found the config-file, including version checking: - if(FPHSA_CONFIG_MODE) - list(INSERT FPHSA_REQUIRED_VARS 0 ${_NAME}_CONFIG) - list(REMOVE_DUPLICATES FPHSA_REQUIRED_VARS) - set(FPHSA_VERSION_VAR ${_NAME}_VERSION) - endif() - - if(NOT FPHSA_REQUIRED_VARS) - message(FATAL_ERROR "No REQUIRED_VARS specified for FIND_PACKAGE_HANDLE_STANDARD_ARGS()") - endif() - - list(GET FPHSA_REQUIRED_VARS 0 _FIRST_REQUIRED_VAR) - - string(TOUPPER ${_NAME} _NAME_UPPER) - string(TOLOWER ${_NAME} _NAME_LOWER) - - # collect all variables which were not found, so they can be printed, so the - # user knows better what went wrong (#6375) - set(MISSING_VARS "") - set(DETAILS "") - set(${_NAME_UPPER}_FOUND TRUE) - # check if all passed variables are valid - foreach(_CURRENT_VAR ${FPHSA_REQUIRED_VARS}) - if(NOT ${_CURRENT_VAR}) - set(${_NAME_UPPER}_FOUND FALSE) - set(MISSING_VARS "${MISSING_VARS} ${_CURRENT_VAR}") - else() - set(DETAILS "${DETAILS}[${${_CURRENT_VAR}}]") - endif() - endforeach() - - # component handling - unset(FOUND_COMPONENTS_MSG) - unset(MISSING_COMPONENTS_MSG) - - if(FPHSA_HANDLE_COMPONENTS) - foreach(comp ${${_NAME}_FIND_COMPONENTS}) - if(${_NAME}_${comp}_FOUND) - - if(NOT DEFINED FOUND_COMPONENTS_MSG) - set(FOUND_COMPONENTS_MSG "found components: ") - endif() - set(FOUND_COMPONENTS_MSG "${FOUND_COMPONENTS_MSG} ${comp}") - - else() - - if(NOT DEFINED MISSING_COMPONENTS_MSG) - set(MISSING_COMPONENTS_MSG "missing components: ") - endif() - set(MISSING_COMPONENTS_MSG "${MISSING_COMPONENTS_MSG} ${comp}") - - if(${_NAME}_FIND_REQUIRED_${comp}) - set(${_NAME_UPPER}_FOUND FALSE) - set(MISSING_VARS "${MISSING_VARS} ${comp}") - endif() - - endif() - endforeach() - set(COMPONENT_MSG "${FOUND_COMPONENTS_MSG} ${MISSING_COMPONENTS_MSG}") - set(DETAILS "${DETAILS}[c${COMPONENT_MSG}]") - endif() - - # version handling: - set(VERSION_MSG "") - set(VERSION_OK TRUE) - set(VERSION ${${FPHSA_VERSION_VAR}} ) - if (${_NAME}_FIND_VERSION) - - if(VERSION) - - if(${_NAME}_FIND_VERSION_EXACT) # exact version required - if (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}") - set(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is exact version \"${${_NAME}_FIND_VERSION}\"") - set(VERSION_OK FALSE) - else () - set(VERSION_MSG "(found suitable exact version \"${VERSION}\")") - endif () - - else() # minimum version specified: - if ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}") - set(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is at least \"${${_NAME}_FIND_VERSION}\"") - set(VERSION_OK FALSE) - else () - set(VERSION_MSG "(found suitable version \"${VERSION}\", minimum required is \"${${_NAME}_FIND_VERSION}\")") - endif () - endif() - - else() - - # if the package was not found, but a version was given, add that to the output: - if(${_NAME}_FIND_VERSION_EXACT) - set(VERSION_MSG "(Required is exact version \"${${_NAME}_FIND_VERSION}\")") - else() - set(VERSION_MSG "(Required is at least version \"${${_NAME}_FIND_VERSION}\")") - endif() - - endif() - else () - if(VERSION) - set(VERSION_MSG "(found version \"${VERSION}\")") - endif() - endif () - - if(VERSION_OK) - set(DETAILS "${DETAILS}[v${VERSION}(${${_NAME}_FIND_VERSION})]") - else() - set(${_NAME_UPPER}_FOUND FALSE) - endif() - - - # print the result: - if (${_NAME_UPPER}_FOUND) - FIND_PACKAGE_MESSAGE(${_NAME} "Found ${_NAME}: ${${_FIRST_REQUIRED_VAR}} ${VERSION_MSG} ${COMPONENT_MSG}" "${DETAILS}") - else () - - if(FPHSA_CONFIG_MODE) - _FPHSA_HANDLE_FAILURE_CONFIG_MODE() - else() - if(NOT VERSION_OK) - _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: ${VERSION_MSG} (found ${${_FIRST_REQUIRED_VAR}})") - else() - _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} (missing: ${MISSING_VARS}) ${VERSION_MSG}") - endif() - endif() - - endif () - - set(${_NAME_UPPER}_FOUND ${${_NAME_UPPER}_FOUND} PARENT_SCOPE) - -endfunction() diff --git a/Build/source/libs/gd/libgd-src/cmake/modules/FindJPEG.cmake b/Build/source/libs/gd/libgd-src/cmake/modules/FindRAQM.cmake index bb310d65dcb..ffb908b600b 100644 --- a/Build/source/libs/gd/libgd-src/cmake/modules/FindJPEG.cmake +++ b/Build/source/libs/gd/libgd-src/cmake/modules/FindRAQM.cmake @@ -1,14 +1,14 @@ -# - Find JPEG -# Find the native JPEG includes and library +# - Find the native RAQM includes and library +# + # This module defines -# JPEG_INCLUDE_DIR, where to find jpeglib.h, etc. -# JPEG_LIBRARIES, the libraries needed to use JPEG. -# JPEG_FOUND, If false, do not try to use JPEG. -# also defined, but not for general use are -# JPEG_LIBRARY, where to find the JPEG library. - -#============================================================================= -# Copyright 2001-2009 Kitware, Inc. +# RAQM_INCLUDE_DIR, where to find raqm.h, etc. +# RAQM_LIBRARIES, the libraries to link against to use RAQM. +# RAQM_FOUND, If false, do not try to use RAQM. +# Also defined, but not for general use are +# RAQM_LIBRARY, where to find the RAQM library. + +# Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are @@ -16,16 +16,16 @@ # # * 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. -# +# # * The names of Kitware, Inc., the Insight Consortium, or the names of # any consortium members, or of any contributors, may not be used to # endorse or promote products derived from this software without # specific prior written permission. -# +# # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER 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 @@ -37,24 +37,33 @@ # 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. -find_path(JPEG_INCLUDE_DIR jpeglib.h) +SET(RAQM_FOUND "NO") -set(JPEG_NAMES ${JPEG_NAMES} jpeg libjpeg_a) -find_library(JPEG_LIBRARY NAMES ${JPEG_NAMES} ) +FIND_PATH(RAQM_INCLUDE_DIR raqm.h + /usr/local/include + /usr/include +) -# handle the QUIETLY and REQUIRED arguments and set JPEG_FOUND to TRUE if -# all listed variables are TRUE -include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(JPEG DEFAULT_MSG JPEG_LIBRARY JPEG_INCLUDE_DIR) +SET(RAQM_NAMES ${RAQM_NAMES} raqm) +FIND_LIBRARY(RAQM_LIBRARY + NAMES ${RAQM_NAMES} + PATH /usr/local/lib /usr/lib +) -if(JPEG_FOUND) - set(JPEG_LIBRARIES ${JPEG_LIBRARY}) -endif() +IF (RAQM_LIBRARY AND RAQM_INCLUDE_DIR) + SET(RAQM_FOUND "YES") + SET(HAVE_LIBRAQM 1) + SET(RAQM_LIBRARIES ${RAQM_LIBRARY}) +ENDIF (RAQM_LIBRARY AND RAQM_INCLUDE_DIR) -# Deprecated declarations. -set (NATIVE_JPEG_INCLUDE_PATH ${JPEG_INCLUDE_DIR} ) -if(JPEG_LIBRARY) - get_filename_component (NATIVE_JPEG_LIB_PATH ${JPEG_LIBRARY} PATH) -endif() +IF (RAQM_FOUND) + IF (NOT RAQM_FIND_QUIETLY) + MESSAGE(STATUS "Find RAQM: ${RAQM_LIBRARY}") + ENDIF (NOT RAQM_FIND_QUIETLY) +ELSE (RAQM_FOUDN) + IF (RAQM_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find RAQM library") + ENDIF (RAQM_FIND_REQUIRED) +ENDIF (RAQM_FOUND) -mark_as_advanced(JPEG_LIBRARY JPEG_INCLUDE_DIR ) +MARK_AS_ADVANCED(RAQM_INCLUDE_DIR RAQM_LIBRARY) diff --git a/Build/source/libs/gd/libgd-src/cmake/modules/FindWEBP.cmake b/Build/source/libs/gd/libgd-src/cmake/modules/FindWEBP.cmake index f7b89c3875d..1fc8bf8e592 100644 --- a/Build/source/libs/gd/libgd-src/cmake/modules/FindWEBP.cmake +++ b/Build/source/libs/gd/libgd-src/cmake/modules/FindWEBP.cmake @@ -2,9 +2,8 @@ # # This module defines -# WEBP_INCLUDE_DIR, where to find png.h, etc. +# WEBP_INCLUDE_DIR, where to find decode.h, etc. # WEBP_LIBRARIES, the libraries to link against to use WEBP. -# WEBP_DEFINITIONS - You should ADD_DEFINITONS(${WEBP_DEFINITIONS}) before compiling code that includes png library files. # WEBP_FOUND, If false, do not try to use WEBP. # also defined, but not for general use are # WEBP_LIBRARY, where to find the WEBP library. @@ -17,16 +16,16 @@ # # * 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. -# +# # * The names of Kitware, Inc., the Insight Consortium, or the names of # any consortium members, or of any contributors, may not be used to # endorse or promote products derived from this software without # specific prior written permission. -# +# # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER 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 diff --git a/Build/source/libs/gd/libgd-src/cmake/modules/FindXPM.cmake b/Build/source/libs/gd/libgd-src/cmake/modules/FindXPM.cmake index 9b59feaa10e..2cb0c221825 100644 --- a/Build/source/libs/gd/libgd-src/cmake/modules/FindXPM.cmake +++ b/Build/source/libs/gd/libgd-src/cmake/modules/FindXPM.cmake @@ -2,9 +2,9 @@ # # This module defines -# XPM_INCLUDE_DIR, where to find png.h, etc. +# XPM_INCLUDE_DIR, where to find xpm.h, etc. # XPM_LIBRARIES, the libraries to link against to use XPM. -# XPM_DEFINITIONS - You should ADD_DEFINITONS(${XPM_DEFINITIONS}) before compiling code that includes png library files. +# XPM_DEFINITIONS - You should ADD_DEFINITONS(${XPM_DEFINITIONS}) before compiling code that includes xpm library files. # XPM_FOUND, If false, do not try to use XPM. # also defined, but not for general use are # XPM_LIBRARY, where to find the XPM library. @@ -17,16 +17,16 @@ # # * 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. -# +# # * The names of Kitware, Inc., the Insight Consortium, or the names of # any consortium members, or of any contributors, may not be used to # endorse or promote products derived from this software without # specific prior written permission. -# +# # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER 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 diff --git a/Build/source/libs/gd/libgd-src/cmake/modules/TestForHighBitCharacters.c b/Build/source/libs/gd/libgd-src/cmake/modules/TestForHighBitCharacters.c index 2be51745ac8..0bc34d9cbc7 100644 --- a/Build/source/libs/gd/libgd-src/cmake/modules/TestForHighBitCharacters.c +++ b/Build/source/libs/gd/libgd-src/cmake/modules/TestForHighBitCharacters.c @@ -1,4 +1,4 @@ -/* +/* * Copyright (C) 2006 Alan W. Irwin * * This file is part of PLplot. diff --git a/Build/source/libs/gd/libgd-src/cmake/modules/TestForHighBitCharacters.cmake b/Build/source/libs/gd/libgd-src/cmake/modules/TestForHighBitCharacters.cmake index b1a1b908223..dabf6b221dc 100644 --- a/Build/source/libs/gd/libgd-src/cmake/modules/TestForHighBitCharacters.cmake +++ b/Build/source/libs/gd/libgd-src/cmake/modules/TestForHighBitCharacters.cmake @@ -19,11 +19,11 @@ # Check if ctype.h macros work on characters with the high bit set. if(NOT DEFINED CMAKE_HIGH_BIT_CHARACTERS) - message(STATUS + message(STATUS "Check for whether ctype.h macros work on characters with the\n" " high bit set." ) - try_compile(CMAKE_HIGH_BIT_CHARACTERS + try_compile(CMAKE_HIGH_BIT_CHARACTERS ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/CMakeModules/TestForHighBitCharacters.c OUTPUT_VARIABLE OUTPUT) diff --git a/Build/source/libs/gd/libgd-src/cmake/modules/gd.cmake b/Build/source/libs/gd/libgd-src/cmake/modules/gd.cmake index bef21f94f36..963b4aeed59 100644 --- a/Build/source/libs/gd/libgd-src/cmake/modules/gd.cmake +++ b/Build/source/libs/gd/libgd-src/cmake/modules/gd.cmake @@ -7,7 +7,11 @@ MACRO(ADD_GD_TESTS) FOREACH(test_name ${TESTS_FILES}) SET(test_prog_name "test_${TEST_PREFIX}_${test_name}") add_executable(${test_prog_name} "${test_name}.c") - target_link_libraries (${test_prog_name} gdTest ${ARGV0}) + IF(WIN32) + target_link_libraries (${test_prog_name} gdTest ${ARGV0}) + ELSE(WIN32) + target_link_libraries (${test_prog_name} gdTest m ${ARGV0}) + ENDIF(WIN32) add_test(NAME ${test_prog_name} COMMAND ${test_prog_name}) ENDFOREACH(test_name) ENDMACRO(ADD_GD_TESTS) |