aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/cmake/FindOpenJPEG.cmake
diff options
context:
space:
mode:
authorJacek Antonelli2008-09-06 18:24:57 -0500
committerJacek Antonelli2008-09-06 18:25:07 -0500
commit798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch)
tree1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/cmake/FindOpenJPEG.cmake
parentSecond Life viewer sources 1.20.15 (diff)
downloadmeta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz
Second Life viewer sources 1.21.0-RC
Diffstat (limited to 'linden/indra/cmake/FindOpenJPEG.cmake')
-rw-r--r--linden/indra/cmake/FindOpenJPEG.cmake50
1 files changed, 50 insertions, 0 deletions
diff --git a/linden/indra/cmake/FindOpenJPEG.cmake b/linden/indra/cmake/FindOpenJPEG.cmake
new file mode 100644
index 0000000..949384e
--- /dev/null
+++ b/linden/indra/cmake/FindOpenJPEG.cmake
@@ -0,0 +1,50 @@
1# -*- cmake -*-
2
3# - Find OpenJPEG
4# Find the OpenJPEG includes and library
5# This module defines
6# OPENJPEG_INCLUDE_DIR, where to find openjpeg.h, etc.
7# OPENJPEG_LIBRARIES, the libraries needed to use OpenJPEG.
8# OPENJPEG_FOUND, If false, do not try to use OpenJPEG.
9# also defined, but not for general use are
10# OPENJPEG_LIBRARY, where to find the OpenJPEG library.
11
12FIND_PATH(OPENJPEG_INCLUDE_DIR openjpeg.h
13/usr/local/include/openjpeg
14/usr/local/include
15/usr/include/openjpeg
16/usr/include
17)
18
19SET(OPENJPEG_NAMES ${OPENJPEG_NAMES} openjpeg)
20FIND_LIBRARY(OPENJPEG_LIBRARY
21 NAMES ${OPENJPEG_NAMES}
22 PATHS /usr/lib /usr/local/lib
23 )
24
25IF (OPENJPEG_LIBRARY AND OPENJPEG_INCLUDE_DIR)
26 SET(OPENJPEG_LIBRARIES ${OPENJPEG_LIBRARY})
27 SET(OPENJPEG_FOUND "YES")
28ELSE (OPENJPEG_LIBRARY AND OPENJPEG_INCLUDE_DIR)
29 SET(OPENJPEG_FOUND "NO")
30ENDIF (OPENJPEG_LIBRARY AND OPENJPEG_INCLUDE_DIR)
31
32
33IF (OPENJPEG_FOUND)
34 IF (NOT OPENJPEG_FIND_QUIETLY)
35 MESSAGE(STATUS "Found OpenJPEG: ${OPENJPEG_LIBRARIES}")
36 ENDIF (NOT OPENJPEG_FIND_QUIETLY)
37ELSE (OPENJPEG_FOUND)
38 IF (OPENJPEG_FIND_REQUIRED)
39 MESSAGE(FATAL_ERROR "Could not find OpenJPEG library")
40 ENDIF (OPENJPEG_FIND_REQUIRED)
41ENDIF (OPENJPEG_FOUND)
42
43# Deprecated declarations.
44SET (NATIVE_OPENJPEG_INCLUDE_PATH ${OPENJPEG_INCLUDE_DIR} )
45GET_FILENAME_COMPONENT (NATIVE_OPENJPEG_LIB_PATH ${OPENJPEG_LIBRARY} PATH)
46
47MARK_AS_ADVANCED(
48 OPENJPEG_LIBRARY
49 OPENJPEG_INCLUDE_DIR
50 )