summaryrefslogtreecommitdiff
path: root/Build/source/libs/gd/libgd-src/cmake
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2021-08-29 02:09:43 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2021-08-29 02:09:43 +0000
commit5003f15f368f1ae0e925f78bf482c98fe06e68ba (patch)
tree30b59c713053750b038cd0a77d852cee2f491a25 /Build/source/libs/gd/libgd-src/cmake
parent2a5ab9d04556bdef2373c3b78f48cea876df4861 (diff)
libgd 2.3.2
git-svn-id: svn://tug.org/texlive/trunk@60353 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/gd/libgd-src/cmake')
-rwxr-xr-xBuild/source/libs/gd/libgd-src/cmake/distclean.sh2
-rw-r--r--Build/source/libs/gd/libgd-src/cmake/modules/FindHEIF.cmake82
-rw-r--r--Build/source/libs/gd/libgd-src/cmake/modules/FindWEBP.cmake2
-rw-r--r--Build/source/libs/gd/libgd-src/cmake/modules/gd.cmake1
4 files changed, 85 insertions, 2 deletions
diff --git a/Build/source/libs/gd/libgd-src/cmake/distclean.sh b/Build/source/libs/gd/libgd-src/cmake/distclean.sh
index 0124dd12e7c..c47a6be0b45 100755
--- a/Build/source/libs/gd/libgd-src/cmake/distclean.sh
+++ b/Build/source/libs/gd/libgd-src/cmake/distclean.sh
@@ -12,7 +12,7 @@ Clean all the cmake generated output files.
Options:
--automake Do not clean files autotools also creates
EOF
- exit ${1:-0}
+ exit "${1:-0}"
}
AUTOMAKE="false"
diff --git a/Build/source/libs/gd/libgd-src/cmake/modules/FindHEIF.cmake b/Build/source/libs/gd/libgd-src/cmake/modules/FindHEIF.cmake
new file mode 100644
index 00000000000..adc5cce3fe3
--- /dev/null
+++ b/Build/source/libs/gd/libgd-src/cmake/modules/FindHEIF.cmake
@@ -0,0 +1,82 @@
+# - Find the native HEIF includes and library
+#
+
+# This module defines
+# HEIF_INCLUDE_DIR, where to find heif.h, etc.
+# HEIF_LIBRARIES, the libraries to link against to use HEIF.
+# HEIF_FOUND, If false, do not try to use HEIF.
+# Also defined, but not for general use are
+# HEIF_LIBRARY, where to find the HEIF 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(HEIF_FOUND "NO")
+
+# 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(HEIF_PKG QUIET fontconfig)
+endif( NOT WIN32 )
+
+FIND_PATH(HEIF_INCLUDE_DIR NAMES libheif/heif.h
+ PATHS
+ /usr/local/include
+ /usr/include
+ HINTS
+ ${HEIF_PKG_INCLUDE_DIRS} # Generated by pkg-config
+)
+
+SET(HEIF_NAMES ${HEIF_NAMES} heif ${HEIF_PKG_LIBRARY})
+FIND_LIBRARY(HEIF_LIBRARY
+ NAMES ${HEIF_NAMES}
+ PATH /usr/local/lib /usr/lib
+ PATH_SUFFIXES lib64 lib
+ HINTS ${HEIF_PKG_LIBRARY_DIRS} # Generated by pkg-config
+)
+
+IF (HEIF_LIBRARY AND HEIF_INCLUDE_DIR)
+ SET(HEIF_FOUND "YES")
+ SET(HAVE_LIBHEIF 1)
+ SET(HEIF_LIBRARIES ${HEIF_LIBRARY})
+ENDIF (HEIF_LIBRARY AND HEIF_INCLUDE_DIR)
+
+IF (HEIF_FOUND)
+ IF (NOT HEIF_FIND_QUIETLY)
+ MESSAGE(STATUS "Find HEIF: ${HEIF_LIBRARY}")
+ ENDIF (NOT HEIF_FIND_QUIETLY)
+ELSE (HEIF_FOUND)
+ IF (HEIF_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR "Could not find HEIF library")
+ ENDIF (HEIF_FIND_REQUIRED)
+ENDIF (HEIF_FOUND)
+
+MARK_AS_ADVANCED(HEIF_INCLUDE_DIR HEIF_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 1fc8bf8e592..cc9355205f8 100644
--- a/Build/source/libs/gd/libgd-src/cmake/modules/FindWEBP.cmake
+++ b/Build/source/libs/gd/libgd-src/cmake/modules/FindWEBP.cmake
@@ -47,7 +47,7 @@ find_path(WEBP_INCLUDE_DIR decode.h
set(WEBP_NAMES ${WEBP_NAMES} webp)
find_library(WEBP_LIBRARY
NAMES ${WEBP_NAMES}
- PATHS "${PROJECT_SOURCE_DIR}/../deps/lib" /usr/lib64 /usr/lib /usr/local/lib
+ PATHS /usr/lib64 /usr/lib /usr/local/lib
)
if (WEBP_LIBRARY AND WEBP_INCLUDE_DIR)
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 963b4aeed59..831a7763208 100644
--- a/Build/source/libs/gd/libgd-src/cmake/modules/gd.cmake
+++ b/Build/source/libs/gd/libgd-src/cmake/modules/gd.cmake
@@ -13,5 +13,6 @@ MACRO(ADD_GD_TESTS)
target_link_libraries (${test_prog_name} gdTest m ${ARGV0})
ENDIF(WIN32)
add_test(NAME ${test_prog_name} COMMAND ${test_prog_name})
+ SET_PROPERTY(TEST ${test_prog_name} PROPERTY SKIP_RETURN_CODE 77)
ENDFOREACH(test_name)
ENDMACRO(ADD_GD_TESTS)