this repo has no description
at master 49 lines 1.3 kB view raw
1# By Jonathan Dearborn 2# Based on FindFFMPEG.cmake 3# Copyright (c) 2008 Andreas Schneider <mail@cynapses.org> 4# 5# Redistribution and use is allowed according to the terms of the New 6# BSD license. 7# 8# Defines: 9# STBI_FOUND 10# STBI_INCLUDE_DIR 11# STBI_LIBRARY 12# 13 14if (STBI_LIBRARY AND STBI_INCLUDE_DIR) 15 set(STBI_FOUND TRUE) 16else (STBI_LIBRARY AND STBI_INCLUDE_DIR) 17 # Use pkg-config if possible 18 find_package(PkgConfig) 19 if (PKG_CONFIG_FOUND) 20 pkg_check_modules(_STBI_LIB libstbi) 21 endif (PKG_CONFIG_FOUND) 22 23 find_path(STBI_INCLUDE_DIR 24 NAMES stb_image.h 25 PATHS ${_STBI_INCLUDE_DIRS} /usr/include /usr/local/include /opt/local/include /sw/include 26 PATH_SUFFIXES stbi 27 ) 28 29 find_library(STBI_LIBRARY 30 NAMES stbi 31 PATHS ${_STBI_LIBRARY_DIRS} /usr/lib /usr/local/lib /opt/local/lib /sw/lib 32 ) 33 34 if (STBI_LIBRARY) 35 set(STBI_FOUND TRUE) 36 endif(STBI_LIBRARY) 37 38 if (STBI_FOUND) 39 if (NOT STBI_FIND_QUIETLY) 40 message(STATUS "Found stb-image: ${STBI_LIBRARY}, ${STBI_INCLUDE_DIR}") 41 endif (NOT STBI_FIND_QUIETLY) 42 else (STBI_FOUND) 43 if (STBI_FIND_REQUIRED) 44 message(FATAL_ERROR "Could not find stb-image") 45 endif (STBI_FIND_REQUIRED) 46 endif (STBI_FOUND) 47 48endif (STBI_LIBRARY AND STBI_INCLUDE_DIR) 49