[CMake] Volunteering to maintain two new Find Modules
Albert Astals Cid
aacid at kde.org
Wed Jan 7 17:54:05 EST 2009
Hi, i'm new to the list, so i'm not sure if this is the correct procedure, i
read a bit in the wiki and it seems it is, so here i am.
I want to add upstream the two attached modules so we don't have to maintain
them in poppler. I'll have to maintain them upstream but maybe more people
will use them and find bugs/improve.
They are pretty simple and work for us in poppler.
Albert
-------------- next part --------------
# - Try to find the libopenjpeg library
# Once done this will define
#
# LIBOPENJPEG_FOUND - system has libopenjpeg
# LIBOPENJPEG_INCLUDE_DIRS - the libopenjpeg include directories
# LIBOPENJPEG_LIBRARIES - Link these to use libopenjpeg
# LIBOPENJPEG_INCLUDE_DIR is internal and deprecated for use
# Copyright (c) 2008, Albert Astals Cid, <aacid at kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
if (LIBOPENJPEG_LIBRARIES AND LIBOPENJPEG_INCLUDE_DIR)
# in cache already
set(LIBOPENJPEG_FOUND TRUE)
else (LIBOPENJPEG_LIBRARIES AND LIBOPENJPEG_INCLUDE_DIR)
#reset vars
set(LIBOPENJPEG_LIBRARIES)
set(LIBOPENJPEG_INCLUDE_DIR)
find_path (LIBOPENJPEG_INCLUDE_DIR openjpeg.h PATH_SUFFIXES openjpeg)
find_library(LIBOPENJPEG_LIBRARIES openjpeg)
if(LIBOPENJPEG_INCLUDE_DIR AND LIBOPENJPEG_LIBRARIES)
set(LIBOPENJPEG_FOUND TRUE)
endif(LIBOPENJPEG_INCLUDE_DIR AND LIBOPENJPEG_LIBRARIES)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LibOpenJPEG DEFAULT_MSG LIBOPENJPEG_LIBRARIES LIBOPENJPEG_INCLUDE_DIR)
endif (LIBOPENJPEG_LIBRARIES AND LIBOPENJPEG_INCLUDE_DIR)
set(LIBOPENJPEG_INCLUDE_DIRS ${LIBOPENJPEG_INCLUDE_DIR})
-------------- next part --------------
# - Try to find the liblcms library
# Once done this will define
#
# LCMS_FOUND - system has liblcms
# LCMS_INCLUDE_DIRS - the liblcms include directories
# LCMS_LIBRARIES - Link these to use liblcms
# LCMS_INCLUDE_DIR is internal and deprecated for use
# Copyright (c) 2008, Albert Astals Cid, <aacid at kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
if (LCMS_LIBRARIES AND LCMS_INCLUDE_DIR)
# in cache already
set(LCMS_FOUND TRUE)
else (LCMS_LIBRARIES AND LCMS_INCLUDE_DIR)
#reset vars
set(LCMS_LIBRARIES)
set(LCMS_INCLUDE_DIR)
find_path (LCMS_INCLUDE_DIR lcms.h)
find_library(LCMS_LIBRARIES lcms)
if(LCMS_INCLUDE_DIR AND LCMS_LIBRARIES)
set(LCMS_FOUND TRUE)
endif(LCMS_INCLUDE_DIR AND LCMS_LIBRARIES)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LCMS DEFAULT_MSG LCMS_LIBRARIES LCMS_INCLUDE_DIR)
endif (LCMS_LIBRARIES AND LCMS_INCLUDE_DIR)
set(LCMS_INCLUDE_DIRS ${LCMS_INCLUDE_DIR})
More information about the CMake
mailing list