forked from gwaldron/osgearth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFindExpat.cmake
52 lines (47 loc) · 1.17 KB
/
FindExpat.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Locate EXPAT
# This module defines
# EXPAT_LIBRARY
# EXPAT_FOUND, if false, do not try to link to expat
# EXPAT_INCLUDE_DIR, where to find the headers
#
# $EXPAT_DIR is an environment variable that would
# correspond to the ./configure --prefix=$EXPAT_DIR
#
# Created by Robert Osfield, adapted by GW
FIND_PATH(EXPAT_INCLUDE_DIR expat.h
${EXPAT_DIR}/include
$ENV{EXPAT_DIR}/include
$ENV{EXPAT_DIR}/Source/lib #Windows Binary Installer
$ENV{EXPAT_DIR}
~/Library/Frameworks
/Library/Frameworks
/usr/local/include
/usr/include
/sw/include # Fink
/opt/local/include # DarwinPorts
/opt/csw/include # Blastwave
/opt/include
/usr/freeware/include
/devel
)
FIND_LIBRARY(EXPAT_LIBRARY
NAMES expat expat_i expat-2.0.1 libexpat
PATHS
${EXPAT_DIR}/lib
$ENV{EXPAT_DIR}/lib
$ENV{EXPAT_DIR}/bin #Windows Binary Installer
$ENV{EXPAT_DIR}
~/Library/Frameworks
/Library/Frameworks
/usr/local/lib
/usr/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
/usr/freeware/lib64
)
SET(EXPAT_FOUND "NO")
IF(EXPAT_LIBRARY AND EXPAT_INCLUDE_DIR)
SET(EXPAT_FOUND "YES")
ENDIF(EXPAT_LIBRARY AND EXPAT_INCLUDE_DIR)