Warning, /graphics/glaxnimate/cmake/modules/FindMagic.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 libmagic
0018 
0019 set(Magic_PREFIX "${CMAKE_SYSTEM_PREFIX_PATH}" CACHE PATH "libmagic installation prefix")
0020 set(Magic_HEADER_BASENAME magic.h)
0021 
0022 find_path(Magic_INCLUDE_DIR ${Magic_HEADER_BASENAME} PATHS ${Magic_PREFIX})
0023 find_library(Magic_LIBRARY NAMES magic PATHS ${Magic_PREFIX})
0024 
0025 if(Magic_INCLUDE_DIR)
0026     set(Magic_FOUND TRUE)
0027     message(STATUS "Found libmagic")
0028 else()
0029     set(Magic_FOUND FALSE)
0030     set(Magic_ERROR_MESSAGE "libmagic not found!")
0031     if(Magic_FIND_REQUIRED)
0032         message(FATAL_ERROR ${Magic_ERROR_MESSAGE})
0033     elseif(NOT Magic_FIND_QUIETLY)
0034         message(STATUS ${Magic_ERROR_MESSAGE})
0035     endif()
0036 endif()