diff options
author | Jacek Antonelli | 2008-09-06 18:24:57 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-09-06 18:25:07 -0500 |
commit | 798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch) | |
tree | 1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/cmake/FindOpenJPEG.cmake | |
parent | Second Life viewer sources 1.20.15 (diff) | |
download | meta-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.cmake | 50 |
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 | |||
12 | FIND_PATH(OPENJPEG_INCLUDE_DIR openjpeg.h | ||
13 | /usr/local/include/openjpeg | ||
14 | /usr/local/include | ||
15 | /usr/include/openjpeg | ||
16 | /usr/include | ||
17 | ) | ||
18 | |||
19 | SET(OPENJPEG_NAMES ${OPENJPEG_NAMES} openjpeg) | ||
20 | FIND_LIBRARY(OPENJPEG_LIBRARY | ||
21 | NAMES ${OPENJPEG_NAMES} | ||
22 | PATHS /usr/lib /usr/local/lib | ||
23 | ) | ||
24 | |||
25 | IF (OPENJPEG_LIBRARY AND OPENJPEG_INCLUDE_DIR) | ||
26 | SET(OPENJPEG_LIBRARIES ${OPENJPEG_LIBRARY}) | ||
27 | SET(OPENJPEG_FOUND "YES") | ||
28 | ELSE (OPENJPEG_LIBRARY AND OPENJPEG_INCLUDE_DIR) | ||
29 | SET(OPENJPEG_FOUND "NO") | ||
30 | ENDIF (OPENJPEG_LIBRARY AND OPENJPEG_INCLUDE_DIR) | ||
31 | |||
32 | |||
33 | IF (OPENJPEG_FOUND) | ||
34 | IF (NOT OPENJPEG_FIND_QUIETLY) | ||
35 | MESSAGE(STATUS "Found OpenJPEG: ${OPENJPEG_LIBRARIES}") | ||
36 | ENDIF (NOT OPENJPEG_FIND_QUIETLY) | ||
37 | ELSE (OPENJPEG_FOUND) | ||
38 | IF (OPENJPEG_FIND_REQUIRED) | ||
39 | MESSAGE(FATAL_ERROR "Could not find OpenJPEG library") | ||
40 | ENDIF (OPENJPEG_FIND_REQUIRED) | ||
41 | ENDIF (OPENJPEG_FOUND) | ||
42 | |||
43 | # Deprecated declarations. | ||
44 | SET (NATIVE_OPENJPEG_INCLUDE_PATH ${OPENJPEG_INCLUDE_DIR} ) | ||
45 | GET_FILENAME_COMPONENT (NATIVE_OPENJPEG_LIB_PATH ${OPENJPEG_LIBRARY} PATH) | ||
46 | |||
47 | MARK_AS_ADVANCED( | ||
48 | OPENJPEG_LIBRARY | ||
49 | OPENJPEG_INCLUDE_DIR | ||
50 | ) | ||