forked from openscenegraph/OpenSceneGraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFindJasper.cmake
76 lines (69 loc) · 1.71 KB
/
FindJasper.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Locate gdal
# This module defines
# JASPER_LIBRARY
# JASPER_FOUND, if false, do not try to link to gdal
# JASPER_INCLUDE_DIR, where to find the headers
#
# $JASPER_DIR is an environment variable that would
# correspond to the ./configure --prefix=$JASPER_DIR
#
# Created by Robert Osfield.
# prefer FindJasper from cmake distribution
if(EXISTS ${CMAKE_ROOT}/Modules/FindJasper.cmake)
include(${CMAKE_ROOT}/Modules/FindJasper.cmake)
if(JASPER_FOUND)
return()
endif()
endif()
FIND_PATH(JASPER_INCLUDE_DIR jasper/jasper.h
$ENV{JASPER_DIR}/include
$ENV{JASPER_DIR}/src/libjasper/include
$ENV{JASPER_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
)
FIND_LIBRARY(JASPER_LIBRARY
NAMES jasper libjasper
PATHS
$ENV{JASPER_DIR}/lib
$ENV{JASPER_DIR}/src/libjasper/lib
$ENV{JASPER_DIR}/src/msvc/Win32_Release
$ENV{JASPER_DIR}
~/Library/Frameworks
/Library/Frameworks
/usr/local/lib
/usr/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
/usr/freeware/lib64
)
FIND_LIBRARY(JASPER_LIBRARY_DEBUG
NAMES jasper libjasper jasperd libjasperd
PATHS
$ENV{JASPER_DIR}/lib
$ENV{JASPER_DIR}/src/libjasper/lib
$ENV{JASPER_DIR}/src/msvc/Win32_Debug
$ENV{JASPER_DIR}
~/Library/Frameworks
/Library/Frameworks
/usr/local/lib
/usr/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
/usr/freeware/lib64
)
SET(JASPER_FOUND "NO")
IF(JASPER_LIBRARY AND JASPER_INCLUDE_DIR)
SET(JASPER_FOUND "YES")
ENDIF(JASPER_LIBRARY AND JASPER_INCLUDE_DIR)