summaryrefslogtreecommitdiff
path: root/Build/source/libs/gd/libgd-src/cmake
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2016-02-16 01:04:51 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2016-02-16 01:04:51 +0000
commiteacd1b8f5c8024296c6fa4b19b3b99bd24de91a1 (patch)
treec0350d7eba85bcb5c01342bfef2f21d34b83c8bd /Build/source/libs/gd/libgd-src/cmake
parent08bed0cad41932663940d45d7fcc96986c2cca3c (diff)
libs/gd: new convention
git-svn-id: svn://tug.org/texlive/trunk@39737 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/gd/libgd-src/cmake')
-rw-r--r--Build/source/libs/gd/libgd-src/cmake/modules/AC_HEADER_STDC.cmake42
-rw-r--r--Build/source/libs/gd/libgd-src/cmake/modules/CMakeParseArguments.cmake156
-rw-r--r--Build/source/libs/gd/libgd-src/cmake/modules/CheckDIRSymbolExists.cmake105
-rw-r--r--Build/source/libs/gd/libgd-src/cmake/modules/CheckPrototypeExists.cmake69
-rw-r--r--Build/source/libs/gd/libgd-src/cmake/modules/FindFontConfig.cmake71
-rw-r--r--Build/source/libs/gd/libgd-src/cmake/modules/FindFreetype.cmake128
-rw-r--r--Build/source/libs/gd/libgd-src/cmake/modules/FindGD.cmake121
-rw-r--r--Build/source/libs/gd/libgd-src/cmake/modules/FindICONV.cmake64
-rw-r--r--Build/source/libs/gd/libgd-src/cmake/modules/FindJPEG.cmake60
-rw-r--r--Build/source/libs/gd/libgd-src/cmake/modules/FindLIQ.cmake59
-rw-r--r--Build/source/libs/gd/libgd-src/cmake/modules/FindPNG.cmake93
-rw-r--r--Build/source/libs/gd/libgd-src/cmake/modules/FindPTHREAD.cmake92
-rw-r--r--Build/source/libs/gd/libgd-src/cmake/modules/FindPackageHandleStandardArgs.cmake317
-rw-r--r--Build/source/libs/gd/libgd-src/cmake/modules/FindVPX.cmake75
-rw-r--r--Build/source/libs/gd/libgd-src/cmake/modules/FindXPM.cmake78
-rw-r--r--Build/source/libs/gd/libgd-src/cmake/modules/TestForHighBitCharacters.c41
-rw-r--r--Build/source/libs/gd/libgd-src/cmake/modules/TestForHighBitCharacters.cmake45
-rw-r--r--Build/source/libs/gd/libgd-src/cmake/modules/TestForStandardHeaderwait.cmake47
-rw-r--r--Build/source/libs/gd/libgd-src/cmake/modules/gd.cmake1
19 files changed, 1664 insertions, 0 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
new file mode 100644
index 00000000000..cf4fff83ba5
--- /dev/null
+++ b/Build/source/libs/gd/libgd-src/cmake/modules/AC_HEADER_STDC.cmake
@@ -0,0 +1,42 @@
+message(STATUS "Checking whether system has ANSI C header files")
+include(CheckPrototypeExists)
+
+include(CheckPrototypeExists)
+check_include_files("dlfcn.h;stdint.h;stddef.h;inttypes.h;stdlib.h;strings.h;string.h;float.h" StandardHeadersExist)
+if(StandardHeadersExist)
+ check_prototype_exists(memchr string.h memchrExists)
+ if(memchrExists)
+
+ check_prototype_exists(free stdlib.h freeExists)
+ if(freeExists)
+ message(STATUS "ANSI C header files - found")
+ set(STDC_HEADERS 1 CACHE INTERNAL "System has ANSI C header files")
+ set(HAVE_STRINGS_H 1)
+ set(HAVE_STRING_H 1)
+ set(HAVE_FLOAT_H 1)
+ set(HAVE_STDLIB_H 1)
+ set(HAVE_STDDEF_H 1)
+ set(HAVE_STDINT_H 1)
+ set(HAVE_INTTYPES_H 1)
+ set(HAVE_DLFCN_H 1)
+ endif(freeExists)
+ endif(memchrExists)
+endif(StandardHeadersExist)
+
+if(NOT STDC_HEADERS)
+ message(STATUS "ANSI C header files - not found")
+ set(STDC_HEADERS 0 CACHE INTERNAL "System has ANSI C header files")
+endif(NOT STDC_HEADERS)
+
+
+check_include_files(unistd.h HAVE_UNISTD_H)
+
+include(CheckDIRSymbolExists)
+check_dirsymbol_exists("sys/stat.h;sys/types.h;dirent.h" HAVE_DIRENT_H)
+if (HAVE_DIRENT_H)
+ set(HAVE_SYS_STAT_H 1)
+ set(HAVE_SYS_TYPES_H 1)
+endif (HAVE_DIRENT_H)
+
+check_include_files("dlfcn.h;stdint.h;stddef.h;inttypes.h;stdlib.h;strings.h;string.h;float.h" StandardHeadersExist)
+set(HAVE_LIBM 1)
diff --git a/Build/source/libs/gd/libgd-src/cmake/modules/CMakeParseArguments.cmake b/Build/source/libs/gd/libgd-src/cmake/modules/CMakeParseArguments.cmake
new file mode 100644
index 00000000000..b57b0296d3f
--- /dev/null
+++ b/Build/source/libs/gd/libgd-src/cmake/modules/CMakeParseArguments.cmake
@@ -0,0 +1,156 @@
+# 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
new file mode 100644
index 00000000000..dde6c7f3af8
--- /dev/null
+++ b/Build/source/libs/gd/libgd-src/cmake/modules/CheckDIRSymbolExists.cmake
@@ -0,0 +1,105 @@
+# 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
+# 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.
+
+# - Check if the DIR symbol exists like in AC_HEADER_DIRENT.
+# CHECK_DIRSYMBOL_EXISTS(FILES VARIABLE)
+#
+# FILES - include files to check
+# VARIABLE - variable to return result
+#
+# This module is a small but important variation on CheckSymbolExists.cmake.
+# The symbol always searched for is DIR, and the test programme follows
+# 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:
+#
+# CMAKE_REQUIRED_FLAGS = string of compile command line flags
+# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
+# CMAKE_REQUIRED_INCLUDES = list of include directories
+# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
+
+MACRO(CHECK_DIRSYMBOL_EXISTS FILES VARIABLE)
+ IF(NOT DEFINED ${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
+ "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
+ ELSE(CMAKE_REQUIRED_LIBRARIES)
+ SET(CHECK_DIRSYMBOL_EXISTS_LIBS)
+ ENDIF(CMAKE_REQUIRED_LIBRARIES)
+ IF(CMAKE_REQUIRED_INCLUDES)
+ SET(CMAKE_DIRSYMBOL_EXISTS_INCLUDES
+ "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
+ ELSE(CMAKE_REQUIRED_INCLUDES)
+ SET(CMAKE_DIRSYMBOL_EXISTS_INCLUDES)
+ ENDIF(CMAKE_REQUIRED_INCLUDES)
+ FOREACH(FILE ${FILES})
+ SET(CMAKE_CONFIGURABLE_FILE_CONTENT
+ "${CMAKE_CONFIGURABLE_FILE_CONTENT}#include <${FILE}>\n")
+ ENDFOREACH(FILE)
+ SET(CMAKE_CONFIGURABLE_FILE_CONTENT
+ "${CMAKE_CONFIGURABLE_FILE_CONTENT}\nint main()\n{if ((DIR *) 0) return 0;}\n")
+
+ CONFIGURE_FILE("${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in"
+ "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckDIRSymbolExists.c" @ONLY)
+
+ MESSAGE(STATUS "Looking for DIR in ${FILES}")
+ TRY_COMPILE(${VARIABLE}
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckDIRSymbolExists.c
+ COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
+ CMAKE_FLAGS
+ -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_DIRSYMBOL_EXISTS_FLAGS}
+ "${CHECK_DIRSYMBOL_EXISTS_LIBS}"
+ "${CMAKE_DIRSYMBOL_EXISTS_INCLUDES}"
+ OUTPUT_VARIABLE OUTPUT)
+ 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
+ "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"
+ "${CMAKE_CONFIGURABLE_FILE_CONTENT}\n")
+ 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
+ "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"
+ "${CMAKE_CONFIGURABLE_FILE_CONTENT}\n")
+ ENDIF(${VARIABLE})
+ ENDIF(NOT DEFINED ${VARIABLE})
+ENDMACRO(CHECK_DIRSYMBOL_EXISTS)
diff --git a/Build/source/libs/gd/libgd-src/cmake/modules/CheckPrototypeExists.cmake b/Build/source/libs/gd/libgd-src/cmake/modules/CheckPrototypeExists.cmake
new file mode 100644
index 00000000000..85a171758bc
--- /dev/null
+++ b/Build/source/libs/gd/libgd-src/cmake/modules/CheckPrototypeExists.cmake
@@ -0,0 +1,69 @@
+#=============================================================================
+# 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.
+#=============================================================================
+
+# AWI, downloaded from KDE repository since has not yet been transferred
+# to cmake repository as of 2006-07-31.
+# http://websvn.kde.org/trunk/KDE/kdelibs/cmake/modules/CheckPrototypeExists.cmake?rev=505849&view=markup
+#
+# - Check if the prototype for a function exists.
+# CHECK_PROTOTYPE_EXISTS (FUNCTION HEADER VARIABLE)
+#
+# FUNCTION - the name of the function you are looking for
+# HEADER - the header(s) where the prototype should be declared
+# VARIABLE - variable to store the result
+#
+
+INCLUDE(CheckCXXSourceCompiles)
+
+MACRO(CHECK_PROTOTYPE_EXISTS _SYMBOL _HEADER _RESULT)
+ SET(_INCLUDE_FILES)
+ FOREACH(it ${_HEADER})
+ SET(_INCLUDE_FILES "${_INCLUDE_FILES}#include <${it}>\n")
+ ENDFOREACH(it)
+
+ SET(_CHECK_PROTO_EXISTS_SOURCE_CODE "
+${_INCLUDE_FILES}
+void cmakeRequireSymbol(int dummy,...){(void)dummy;}
+int main()
+{
+#ifndef ${_SYMBOL}
+#ifndef _MSC_VER
+ cmakeRequireSymbol(0,&${_SYMBOL});
+#else
+ char i = sizeof(&${_SYMBOL});
+#endif
+#endif
+ return 0;
+}
+")
+ 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
new file mode 100644
index 00000000000..23d0020c52e
--- /dev/null
+++ b/Build/source/libs/gd/libgd-src/cmake/modules/FindFontConfig.cmake
@@ -0,0 +1,71 @@
+# 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
+# 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.
+# IN NO EVENT SHALL THE AUTHOR 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.
+
+# - Try to find Fontconfig
+# Once done this will define
+#
+# FONTCONFIG_FOUND - system has Fontconfig
+# FONTCONFIG_INCLUDE_DIR - the Fontconfig include directory
+# FONTCONFIG_LIBRARY - Link these to use Fontconfig
+
+if ( FONTCONFIG_INCLUDE_DIR AND FONTCONFIG_LIBRARY )
+ # in cache already
+ SET(Fontconfig_FIND_QUIETLY TRUE)
+endif ( FONTCONFIG_INCLUDE_DIR AND FONTCONFIG_LIBRARY )
+
+# 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_LIBRARY NAMES fontconfig ${FONTCONFIG_PKG_LIBRARY}
+ 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_LIBRARY FONTCONFIG_INCLUDE_DIR )
+
+# show the FONTCONFIG_INCLUDE_DIR and FONTCONFIG_LIBRARY variables only in the advanced view
+MARK_AS_ADVANCED(FONTCONFIG_INCLUDE_DIR FONTCONFIG_LIBRARY )
diff --git a/Build/source/libs/gd/libgd-src/cmake/modules/FindFreetype.cmake b/Build/source/libs/gd/libgd-src/cmake/modules/FindFreetype.cmake
new file mode 100644
index 00000000000..3d2a8a48088
--- /dev/null
+++ b/Build/source/libs/gd/libgd-src/cmake/modules/FindFreetype.cmake
@@ -0,0 +1,128 @@
+# - 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 freetype/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/FindGD.cmake b/Build/source/libs/gd/libgd-src/cmake/modules/FindGD.cmake
new file mode 100644
index 00000000000..2860d6cc77f
--- /dev/null
+++ b/Build/source/libs/gd/libgd-src/cmake/modules/FindGD.cmake
@@ -0,0 +1,121 @@
+# - Find GD
+# Find the native GD includes and library
+# This module defines
+# GD_INCLUDE_DIR, where to find gd.h, etc.
+# GD_LIBRARIES, the libraries needed to use GD.
+# GD_FOUND, If false, do not try to use GD.
+# also defined, but not for general use are
+# GD_LIBRARY, where to find the GD library.
+# GD_SUPPORTS_PNG, GD_SUPPORTS_JPEG, GD_SUPPORTS_GIF, test
+# support for image formats in GD.
+
+FIND_PATH(GD_INCLUDE_DIR gd.h
+/usr/local/include
+/usr/include
+)
+
+if(WIN32 AND NOT CYGWIN)
+ SET(GD_NAMES ${GD_NAMES} bgd)
+else(WIN32)
+ SET(GD_NAMES ${GD_NAMES} gd)
+endif(WIN32 AND NOT CYGWIN)
+
+FIND_LIBRARY(GD_LIBRARY
+ NAMES ${GD_NAMES}
+ PATHS /usr/lib64 /usr/lib /usr/local/lib
+ )
+
+IF (GD_LIBRARY AND GD_INCLUDE_DIR)
+ SET(GD_LIBRARIES ${GD_LIBRARY})
+ SET(GD_FOUND "YES")
+ELSE (GD_LIBRARY AND GD_INCLUDE_DIR)
+ SET(GD_FOUND "NO")
+ENDIF (GD_LIBRARY AND GD_INCLUDE_DIR)
+message("Found GD: ${GD_FOUND}")
+IF (GD_FOUND)
+ IF (WIN32 AND NOT CYGWIN)
+ SET(GD_SUPPORTS_PNG ON)
+ SET(GD_SUPPORTS_JPEG ON)
+ SET(GD_SUPPORTS_GIF ON)
+ get_filename_component(GD_LIBRARY_DIR ${GD_LIBRARY} PATH)
+ ELSE (WIN32 AND NOT CYGWIN)
+ INCLUDE(CheckLibraryExists)
+ GET_FILENAME_COMPONENT(GD_LIB_PATH ${GD_LIBRARY} PATH)
+ GET_FILENAME_COMPONENT(GD_LIB ${GD_LIBRARY} NAME)
+
+ CHECK_LIBRARY_EXISTS("${GD_LIBRARY}" "gdImagePng" "${GD_LIB_PATH}" GD_SUPPORTS_PNG)
+ IF (GD_SUPPORTS_PNG)
+ find_package(PNG)
+ IF (PNG_FOUND)
+ SET(GD_LIBRARIES ${GD_LIBRARIES} ${PNG_LIBRARIES})
+ SET(GD_INCLUDE_DIR ${GD_INCLUDE_DIR} ${PNG_INCLUDE_DIR})
+ ELSE (PNG_FOUND)
+ SET(GD_SUPPORTS_PNG "NO")
+ ENDIF (PNG_FOUND)
+ ENDIF (GD_SUPPORTS_PNG)
+
+ CHECK_LIBRARY_EXISTS("${GD_LIBRARY}" "gdImageJpeg" "${GD_LIB_PATH}" GD_SUPPORTS_JPEG)
+ IF (GD_SUPPORTS_JPEG)
+ find_package(JPEG)
+ IF (JPEG_FOUND)
+ SET(GD_LIBRARIES ${GD_LIBRARIES} ${JPEG_LIBRARIES})
+ SET(GD_INCLUDE_DIR ${GD_INCLUDE_DIR} ${JPEG_INCLUDE_DIR})
+ ELSE (JPEG_FOUND)
+ SET(GD_SUPPORTS_JPEG "NO")
+ ENDIF (JPEG_FOUND)
+ ENDIF (GD_SUPPORTS_JPEG)
+
+ CHECK_LIBRARY_EXISTS("${GD_LIBRARY}" "gdImageGif" "${GD_LIB_PATH}" GD_SUPPORTS_GIF)
+
+ # Trim the list of include directories
+ SET(GDINCTRIM)
+ FOREACH(GD_DIR ${GD_INCLUDE_DIR})
+ SET(GD_TMP_FOUND OFF)
+ FOREACH(GD_TRIMMED ${GDINCTRIM})
+ IF ("${GD_DIR}" STREQUAL "${GD_TRIMMED}")
+ SET(GD_TMP_FOUND ON)
+ ENDIF ("${GD_DIR}" STREQUAL "${GD_TRIMMED}")
+ ENDFOREACH(GD_TRIMMED ${GDINCTRIM})
+ IF (NOT GD_TMP_FOUND)
+ SET(GDINCTRIM "${GDINCTRIM}" "${GD_DIR}")
+ ENDIF (NOT GD_TMP_FOUND)
+ ENDFOREACH(GD_DIR ${GD_INCLUDE_DIR})
+ SET(GD_INCLUDE_DIR ${GDINCTRIM})
+
+ SET(GD_LIBRARY_DIR)
+
+ # Generate trimmed list of library directories and list of libraries
+ FOREACH(GD_LIB ${GD_LIBRARIES})
+ GET_FILENAME_COMPONENT(GD_NEXTLIBDIR ${GD_LIB} PATH)
+ SET(GD_TMP_FOUND OFF)
+ FOREACH(GD_LIBDIR ${GD_LIBRARY_DIR})
+ IF ("${GD_NEXTLIBDIR}" STREQUAL "${GD_LIBDIR}")
+ SET(GD_TMP_FOUND ON)
+ ENDIF ("${GD_NEXTLIBDIR}" STREQUAL "${GD_LIBDIR}")
+ ENDFOREACH(GD_LIBDIR ${GD_LIBRARIES})
+ IF (NOT GD_TMP_FOUND)
+ SET(GD_LIBRARY_DIR "${GD_LIBRARY_DIR}" "${GD_NEXTLIBDIR}")
+ ENDIF (NOT GD_TMP_FOUND)
+ ENDFOREACH(GD_LIB ${GD_LIBRARIES})
+ ENDIF (WIN32 AND NOT CYGWIN)
+ENDIF (GD_FOUND)
+
+IF (GD_FOUND)
+ IF (NOT GD_FIND_QUIETLY)
+ MESSAGE(STATUS "Found GD: ${GD_LIBRARY}")
+ ENDIF (NOT GD_FIND_QUIETLY)
+ELSE (GD_FOUND)
+ IF (GD_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR "Could not find GD library")
+ ENDIF (GD_FIND_REQUIRED)
+ENDIF (GD_FOUND)
+
+MARK_AS_ADVANCED(
+ GD_LIBRARY
+ GD_LIBRARIES
+ GD_INCLUDE_DIR
+ GD_LIBRARY_DIR
+ GD_SUPPORTS_PNG
+ GD_SUPPORTS_JPEG
+ GD_SUPPORTS_GIF
+)
diff --git a/Build/source/libs/gd/libgd-src/cmake/modules/FindICONV.cmake b/Build/source/libs/gd/libgd-src/cmake/modules/FindICONV.cmake
new file mode 100644
index 00000000000..49d5f6b95a0
--- /dev/null
+++ b/Build/source/libs/gd/libgd-src/cmake/modules/FindICONV.cmake
@@ -0,0 +1,64 @@
+# - 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)
+
+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 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)
+
+set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR})
+set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES})
+IF(ICONV_FOUND)
+ check_c_compiler_flag("-Werror" ICONV_HAVE_WERROR)
+ set (CMAKE_C_FLAGS_BACKUP "${CMAKE_C_FLAGS}")
+ if(ICONV_HAVE_WERROR)
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
+ endif(ICONV_HAVE_WERROR)
+ check_c_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 )
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS_BACKUP}")
+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
+) \ No newline at end of file
diff --git a/Build/source/libs/gd/libgd-src/cmake/modules/FindJPEG.cmake b/Build/source/libs/gd/libgd-src/cmake/modules/FindJPEG.cmake
new file mode 100644
index 00000000000..bb310d65dcb
--- /dev/null
+++ b/Build/source/libs/gd/libgd-src/cmake/modules/FindJPEG.cmake
@@ -0,0 +1,60 @@
+# - Find JPEG
+# Find the native JPEG 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.
+#
+# 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.
+
+find_path(JPEG_INCLUDE_DIR jpeglib.h)
+
+set(JPEG_NAMES ${JPEG_NAMES} jpeg libjpeg_a)
+find_library(JPEG_LIBRARY NAMES ${JPEG_NAMES} )
+
+# 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)
+
+if(JPEG_FOUND)
+ set(JPEG_LIBRARIES ${JPEG_LIBRARY})
+endif()
+
+# Deprecated declarations.
+set (NATIVE_JPEG_INCLUDE_PATH ${JPEG_INCLUDE_DIR} )
+if(JPEG_LIBRARY)
+ get_filename_component (NATIVE_JPEG_LIB_PATH ${JPEG_LIBRARY} PATH)
+endif()
+
+mark_as_advanced(JPEG_LIBRARY JPEG_INCLUDE_DIR )
diff --git a/Build/source/libs/gd/libgd-src/cmake/modules/FindLIQ.cmake b/Build/source/libs/gd/libgd-src/cmake/modules/FindLIQ.cmake
new file mode 100644
index 00000000000..08713f51704
--- /dev/null
+++ b/Build/source/libs/gd/libgd-src/cmake/modules/FindLIQ.cmake
@@ -0,0 +1,59 @@
+# Find libimagequant includes and library (and download+build if needed)
+# http://pngquant.org/lib
+#
+# 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.
+
+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
+)
+
+FIND_LIBRARY(LIQ_LIBRARY
+ NAMES libimagequant imagequant
+ PATHS "${PROJECT_SOURCE_DIR}/libimagequant" "${PROJECT_SOURCE_DIR}/pngquant/lib" /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_H 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_H 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
new file mode 100644
index 00000000000..a44affcfcc0
--- /dev/null
+++ b/Build/source/libs/gd/libgd-src/cmake/modules/FindPNG.cmake
@@ -0,0 +1,93 @@
+# - 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
new file mode 100644
index 00000000000..0627c6d0a44
--- /dev/null
+++ b/Build/source/libs/gd/libgd-src/cmake/modules/FindPTHREAD.cmake
@@ -0,0 +1,92 @@
+#############################################################################
+#
+# $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}")
diff --git a/Build/source/libs/gd/libgd-src/cmake/modules/FindPackageHandleStandardArgs.cmake b/Build/source/libs/gd/libgd-src/cmake/modules/FindPackageHandleStandardArgs.cmake
new file mode 100644
index 00000000000..de124acce43
--- /dev/null
+++ b/Build/source/libs/gd/libgd-src/cmake/modules/FindPackageHandleStandardArgs.cmake
@@ -0,0 +1,317 @@
+# 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/FindVPX.cmake b/Build/source/libs/gd/libgd-src/cmake/modules/FindVPX.cmake
new file mode 100644
index 00000000000..3a8c45ed196
--- /dev/null
+++ b/Build/source/libs/gd/libgd-src/cmake/modules/FindVPX.cmake
@@ -0,0 +1,75 @@
+# - Find the native VPX includes and library
+#
+
+# This module defines
+# VPX_INCLUDE_DIR, where to find png.h, etc.
+# VPX_LIBRARIES, the libraries to link against to use VPX.
+# VPX_DEFINITIONS - You should ADD_DEFINITONS(${VPX_DEFINITIONS}) before compiling code that includes png library files.
+# VPX_FOUND, If false, do not try to use VPX.
+# also defined, but not for general use are
+# VPX_LIBRARY, where to find the VPX 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
+# 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(FindZLIB)
+
+SET(VPX_FOUND "NO")
+SET(VPX_LIBRARY "")
+
+FIND_PATH(VPX_INCLUDE_DIR vp8cx.h
+/usr/local/include/vpx
+/usr/include/vpx
+)
+
+SET(VPX_NAMES ${VPX_NAMES} "vpxmt" "libvpx")
+FIND_LIBRARY(VPX_LIBRARY
+ NAMES ${VPX_NAMES}
+ PATHS "${PROJECT_SOURCE_DIR}/../deps/lib" /usr/lib64 /usr/lib /usr/local/lib
+)
+
+IF (VPX_LIBRARY AND VPX_INCLUDE_DIR)
+ SET(VPX_INCLUDE_DIR ${VPX_INCLUDE_DIR})
+ SET(VPX_LIBRARIES ${VPX_LIBRARY})
+ SET(VPX_FOUND "YES")
+
+ENDIF (VPX_LIBRARY AND VPX_INCLUDE_DIR)
+
+IF (VPX_FOUND)
+ IF (NOT VPX_FIND_QUIETLY)
+ MESSAGE(STATUS "Found VPX: ${VPX_LIBRARY}")
+ ENDIF (NOT VPX_FIND_QUIETLY)
+ELSE (VPX_FOUND)
+ IF (VPX_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR "Could not find VPX library")
+ ENDIF (VPX_FIND_REQUIRED)
+ENDIF (VPX_FOUND)
+
+MARK_AS_ADVANCED(VPX_INCLUDE_DIR VPX_LIBRARY )
+SET(VPX_LIBRARIES ${VPX_LIBRARY})
diff --git a/Build/source/libs/gd/libgd-src/cmake/modules/FindXPM.cmake b/Build/source/libs/gd/libgd-src/cmake/modules/FindXPM.cmake
new file mode 100644
index 00000000000..9b59feaa10e
--- /dev/null
+++ b/Build/source/libs/gd/libgd-src/cmake/modules/FindXPM.cmake
@@ -0,0 +1,78 @@
+# - Find the native XPM includes and library
+#
+
+# This module defines
+# XPM_INCLUDE_DIR, where to find png.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_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.
+
+# 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
+# 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.
+
+SET(XPM_FOUND "NO")
+
+FIND_PATH(XPM_XPM_INCLUDE_DIR xpm.h
+/usr/local/include/X11
+/usr/include/X11
+)
+
+SET(XPM_NAMES ${XPM_NAMES} Xpm libXpm)
+FIND_LIBRARY(XPM_LIBRARY
+ NAMES ${XPM_NAMES}
+ PATHS /usr/lib64 /usr/lib /usr/local/lib
+)
+
+IF (XPM_LIBRARY AND XPM_XPM_INCLUDE_DIR)
+ SET(XPM_INCLUDE_DIR ${XPM_XPM_INCLUDE_DIR})
+ SET(XPM_LIBRARIES ${XPM_LIBRARY})
+ SET(XPM_FOUND "YES")
+
+ IF (CYGWIN)
+ IF(BUILD_SHARED_LIBS)
+ # No need to define XPM_USE_DLL here, because it's default for Cygwin.
+ ELSE(BUILD_SHARED_LIBS)
+ SET (XPM_DEFINITIONS -DXPM_STATIC)
+ ENDIF(BUILD_SHARED_LIBS)
+ ENDIF (CYGWIN)
+ENDIF (XPM_LIBRARY AND XPM_XPM_INCLUDE_DIR)
+
+IF (XPM_FOUND)
+ IF (NOT XPM_FIND_QUIETLY)
+ MESSAGE(STATUS "Found XPM: ${XPM_LIBRARY}")
+ ENDIF (NOT XPM_FIND_QUIETLY)
+ELSE (XPM_FOUND)
+ IF (XPM_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR "Could not find XPM library")
+ ENDIF (XPM_FIND_REQUIRED)
+ENDIF (XPM_FOUND)
+
+MARK_AS_ADVANCED(XPM_XPM_INCLUDE_DIR XPM_LIBRARY )
diff --git a/Build/source/libs/gd/libgd-src/cmake/modules/TestForHighBitCharacters.c b/Build/source/libs/gd/libgd-src/cmake/modules/TestForHighBitCharacters.c
new file mode 100644
index 00000000000..2be51745ac8
--- /dev/null
+++ b/Build/source/libs/gd/libgd-src/cmake/modules/TestForHighBitCharacters.c
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2006 Alan W. Irwin
+ *
+ * This file is part of PLplot.
+ *
+ * PLplot is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Library General Public License as published
+ * by the Free Software Foundation; version 2 of the License.
+ *
+ * PLplot is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with the file PLplot; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i))
+ exit(1);
+ exit (0);
+}
diff --git a/Build/source/libs/gd/libgd-src/cmake/modules/TestForHighBitCharacters.cmake b/Build/source/libs/gd/libgd-src/cmake/modules/TestForHighBitCharacters.cmake
new file mode 100644
index 00000000000..b1a1b908223
--- /dev/null
+++ b/Build/source/libs/gd/libgd-src/cmake/modules/TestForHighBitCharacters.cmake
@@ -0,0 +1,45 @@
+# cmake/modules/TestForHighBitCharacters.cmake
+#
+# Copyright (C) 2006 Alan W. Irwin
+#
+# This file is part of PLplot.
+#
+# PLplot is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Library General Public License as published
+# by the Free Software Foundation; version 2 of the License.
+#
+# PLplot is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with the file PLplot; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+# Check if ctype.h macros work on characters with the high bit set.
+if(NOT DEFINED CMAKE_HIGH_BIT_CHARACTERS)
+ message(STATUS
+ "Check for whether ctype.h macros work on characters with the\n"
+ " high bit set."
+ )
+ try_compile(CMAKE_HIGH_BIT_CHARACTERS
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_SOURCE_DIR}/CMakeModules/TestForHighBitCharacters.c
+ OUTPUT_VARIABLE OUTPUT)
+ if(CMAKE_HIGH_BIT_CHARACTERS)
+ message(STATUS "High-bit characters - work")
+ set(HIGH_BIT_CHARACTERS 1 CACHE INTERNAL
+ "Do ctype.h macros work on high-bit characters")
+ file(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
+ "Determining if ctype.h macros work on high-bit characters passed with "
+ "the following output:\n${OUTPUT}\n\n")
+ else(CMAKE_HIGH_BIT_CHARACTERS)
+ message(STATUS "High-bit characters - don't work")
+ set(HIGH_BIT_CHARACTERS 0 CACHE INTERNAL
+ "Do ctype.h macros work on high-bit characters")
+ file(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
+ "Determining if ctype.h macros work on high-bit characters failed with "
+ "the following output:\n${OUTPUT}\n\n")
+ endif(CMAKE_HIGH_BIT_CHARACTERS)
+endif(NOT DEFINED CMAKE_HIGH_BIT_CHARACTERS)
diff --git a/Build/source/libs/gd/libgd-src/cmake/modules/TestForStandardHeaderwait.cmake b/Build/source/libs/gd/libgd-src/cmake/modules/TestForStandardHeaderwait.cmake
new file mode 100644
index 00000000000..d3df427f9c8
--- /dev/null
+++ b/Build/source/libs/gd/libgd-src/cmake/modules/TestForStandardHeaderwait.cmake
@@ -0,0 +1,47 @@
+# cmake/modules/CheckHEADER_SYS_WAIT.cmake
+#
+# Copyright (C) 2006 Alan W. Irwin
+#
+# This file is part of PLplot.
+#
+# PLplot is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Library General Public License as published
+# by the Free Software Foundation; version 2 of the License.
+#
+# PLplot is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with the file PLplot; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+#
+# - Check for sys/wait.h that is POSIX.1 compatible following autotools
+# AC_HEADER_SYS_WAIT
+
+include(CheckCSourceCompiles)
+
+set(_CHECK_HEADER_SYS_WAIT_SOURCE_CODE "
+#include <sys/types.h>
+#include <sys/wait.h>
+#ifndef WEXITSTATUS
+# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
+#endif
+#ifndef WIFEXITED
+# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
+#endif
+int
+main ()
+{
+ int s;
+ wait (&s);
+ s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
+ ;
+ return 0;
+}
+")
+check_c_source_compiles(
+"${_CHECK_HEADER_SYS_WAIT_SOURCE_CODE}"
+HAVE_SYS_WAIT_H)
diff --git a/Build/source/libs/gd/libgd-src/cmake/modules/gd.cmake b/Build/source/libs/gd/libgd-src/cmake/modules/gd.cmake
new file mode 100644
index 00000000000..1e846dd855d
--- /dev/null
+++ b/Build/source/libs/gd/libgd-src/cmake/modules/gd.cmake
@@ -0,0 +1 @@
+option(BUILD_TEST "Compile examples in the build tree and enable ctest" OFF)