Merge the switch to the system lua installation from master.
[fail.git] / FindFreeType2.cmake
blob00b497e772e40f71004d17487062c47d0a1ef745
2 #   Fail game engine
3 #   Copyright 2007 Antoine Chavasse <a.chavasse@gmail.com>
4
5 #   This file is part of Fail.
7 #   Fail is free software; you can redistribute it and/or modify
8 #   it under the terms of the GNU General Public License version 3
9 #   as published by the Free Software Foundation.
11 #   Fail is distributed in the hope that it will be useful,
12 #   but WITHOUT ANY WARRANTY; without even the implied warranty of
13 #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 #   GNU General Public License for more details.
16 #   You should have received a copy of the GNU General Public License
17 #   along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 # Look for FreeType2.
21 # Once done, it will set FREETYPE2_FOUND to true, FREETYPE2_LIBRARY and FREETYPE2_INCLUDE_DIR.
23 set( FREETYPE2_FOUND "NO" )
25 find_path( FREETYPE2_INCLUDE_DIR
26         freetype/freetype.h
28         /usr/include/freetype2
29         /usr/local/include/freetype2
30         /opt/local/include/freetype2
31         /sw/include/freetype2
34 find_library( FREETYPE2_LIBRARY
36         freetype
37         
38         /usr/lib
39         /usr/local/lib
40         /opt/local/lib
41         /sw/lib
44 if( FREETYPE2_INCLUDE_DIR AND FREETYPE2_LIBRARY )
45         set( FREETYPE2_FOUND "YES" )
46 endif( FREETYPE2_INCLUDE_DIR AND FREETYPE2_LIBRARY )
48 if( FREETYPE2_FOUND )
49         if( NOT FREETYPE2_FIND_QUIETLY )
50                 message( STATUS "Found FreeType2: ${FREETYPE2_LIBRARY}" )
51         endif( NOT FREETYPE2_FIND_QUIETLY )
52 else( FREETYPE2_FOUND )
53         if( FREETYPE2_FIND_REQUIRED )
54                 message( FATAL_ERROR "Could not find FreeType2" )
55         endif( FREETYPE2_FIND_REQUIRED )
56 endif( FREETYPE2_FOUND )