Warning, /graphics/glaxnimate/cmake/modules/FindImageQuant.cmake is written in an unsupported language. File is not indexed.

0001 #
0002 # Copyright (C) 2015-2020 Mattia Basaglia
0003 #
0004 # This program is free software: you can redistribute it and/or modify
0005 # it under the terms of the GNU General Public License as published by
0006 # the Free Software Foundation, either version 3 of the License, or
0007 # (at your option) any later version.
0008 #
0009 # This program is distributed in the hope that it will be useful,
0010 # but WITHOUT ANY WARRANTY; without even the implied warranty of
0011 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0012 # GNU General Public License for more details.
0013 #
0014 # You should have received a copy of the GNU General Public License
0015 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
0016 #
0017 # Tries to find libav
0018 #
0019 # Input:
0020 #   ImageQuant_PREFIX
0021 #   ImageQuant_LIBRARIES
0022 #   ImageQuant_INCLUDE_DIRS
0023 #
0024 # Output:
0025 #   ImageQuant_FOUND
0026 #   ImageQuant_LIBRARIES
0027 #   ImageQuant_INCLUDE_DIRS
0028 # For each component:
0029 #   ImageQuant_<component>_FOUND
0030 #   ImageQuant_<component>_INCLUDE_DIR
0031 #   ImageQuant_<component>_LIBRARY
0032 
0033 
0034 set(ImageQuant_PREFIX "${CMAKE_SYSTEM_PREFIX_PATH}" CACHE PATH "libimagequant installation prefix")
0035 
0036 if(ImageQuant_LIBRARIES AND ImageQuant_INCLUDE_DIRS)
0037     set(ImageQuant_FOUND TRUE)
0038 else()
0039     set(ImageQuant_LIBRARIES)
0040     set(ImageQuant_INCLUDE_DIRS)
0041 
0042     find_path(
0043         ImageQuant_INCLUDE_DIRS
0044         NAMES
0045             "libimagequant.h"
0046         PATHS
0047             ${ImageQuant_PREFIX}/include
0048             /usr/local/include
0049             /usr/include
0050             /usr/local/homebrew/opt/imagequant/include/
0051     )
0052 
0053     find_library(
0054         ImageQuant_LIBRARIES
0055         NAMES
0056             imagequant
0057         PATHS
0058             ${ImageQuant_PREFIX}/lib
0059             /usr/local/lib
0060             /usr/local/lib/x86_64-linux-gnu
0061             /usr/lib
0062             /usr/lib/x86_64-linux-gnu
0063             /usr/local/homebrew/opt/imagequant/lib/
0064     )
0065 
0066     list(REMOVE_DUPLICATES ImageQuant_INCLUDE_DIRS)
0067 
0068     include(FindPackageHandleStandardArgs)
0069     find_package_handle_standard_args(
0070         ImageQuant
0071         REQUIRED_VARS
0072             ImageQuant_LIBRARIES
0073             ImageQuant_INCLUDE_DIRS
0074         HANDLE_COMPONENTS
0075     )
0076 endif()