1
# - Try to find the libopenjpeg library
2
# Once done this will define
4
# LIBOPENJPEG_FOUND - system has libopenjpeg
5
# LIBOPENJPEG_INCLUDE_DIRS - the libopenjpeg include directories
6
# LIBOPENJPEG_LIBRARIES - Link these to use libopenjpeg
7
# LIBOPENJPEG_INCLUDE_DIR is internal and deprecated for use
9
# Copyright (c) 2008, Albert Astals Cid, <aacid@kde.org>
11
# Redistribution and use is allowed according to the terms of the BSD license.
12
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
15
if (LIBOPENJPEG_LIBRARIES AND LIBOPENJPEG_INCLUDE_DIR)
18
set(LIBOPENJPEG_FOUND TRUE)
20
else (LIBOPENJPEG_LIBRARIES AND LIBOPENJPEG_INCLUDE_DIR)
23
set(LIBOPENJPEG_LIBRARIES)
24
set(LIBOPENJPEG_INCLUDE_DIR)
26
find_path (LIBOPENJPEG_INCLUDE_DIR openjpeg.h PATH_SUFFIXES openjpeg)
27
find_library(LIBOPENJPEG_LIBRARIES openjpeg)
28
if(LIBOPENJPEG_INCLUDE_DIR AND LIBOPENJPEG_LIBRARIES)
29
set(LIBOPENJPEG_FOUND TRUE)
30
endif(LIBOPENJPEG_INCLUDE_DIR AND LIBOPENJPEG_LIBRARIES)
32
include(FindPackageHandleStandardArgs)
33
find_package_handle_standard_args(LibOpenJPEG DEFAULT_MSG LIBOPENJPEG_LIBRARIES LIBOPENJPEG_INCLUDE_DIR)
35
endif (LIBOPENJPEG_LIBRARIES AND LIBOPENJPEG_INCLUDE_DIR)
37
set(LIBOPENJPEG_INCLUDE_DIRS ${LIBOPENJPEG_INCLUDE_DIR})