2015-12-10 05:06:13 +02:00
|
|
|
# - Try to find the libmng
|
|
|
|
# Once done this will define
|
|
|
|
#
|
|
|
|
# MNG_FOUND - system has libmng
|
|
|
|
# MNG_INCLUDES - the libmng include directory
|
|
|
|
# MNG_LIBRARIES - The libraries needed to use libmng
|
|
|
|
#
|
|
|
|
# Copyright (c) 2015, Ivailo Monev, <xakepa10@gmail.com>
|
|
|
|
#
|
|
|
|
# Redistribution and use is allowed according to the terms of the BSD license.
|
|
|
|
|
2015-12-30 10:09:12 +02:00
|
|
|
if(MNG_INCLUDES AND MNG_LIBRARIES)
|
2015-12-10 05:06:13 +02:00
|
|
|
set(MNG_FIND_QUIETLY TRUE)
|
2015-12-16 02:59:15 +02:00
|
|
|
endif()
|
2015-12-10 05:06:13 +02:00
|
|
|
|
2016-01-09 23:55:09 +02:00
|
|
|
if(NOT WIN32)
|
|
|
|
include(FindPkgConfig)
|
|
|
|
pkg_check_modules(PC_MNG QUIET libmng)
|
|
|
|
endif()
|
|
|
|
|
2015-12-10 05:06:13 +02:00
|
|
|
find_path(MNG_INCLUDES
|
|
|
|
NAMES
|
|
|
|
libmng.h
|
|
|
|
PATH_SUFFIXES mng
|
|
|
|
HINTS
|
|
|
|
$ENV{MNGDIR}/include
|
2016-01-09 23:55:09 +02:00
|
|
|
${PC_MNG_INCLUDEDIR}
|
2015-12-30 10:09:12 +02:00
|
|
|
/usr/include
|
|
|
|
/usr/local/include
|
2015-12-10 05:06:13 +02:00
|
|
|
${INCLUDE_INSTALL_DIR}
|
|
|
|
)
|
|
|
|
|
|
|
|
find_library(MNG_LIBRARIES
|
|
|
|
mng
|
|
|
|
HINTS
|
|
|
|
$ENV{MNGDIR}/lib
|
2016-01-09 23:55:09 +02:00
|
|
|
${PC_MNG_LIBDIR}
|
2015-12-30 10:09:12 +02:00
|
|
|
/usr/lib
|
|
|
|
/usr/local/lib
|
2015-12-10 05:06:13 +02:00
|
|
|
${LIB_INSTALL_DIR}
|
|
|
|
)
|
|
|
|
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
find_package_handle_standard_args(MNG DEFAULT_MSG MNG_INCLUDES MNG_LIBRARIES)
|
|
|
|
|
|
|
|
mark_as_advanced(MNG_INCLUDES MNG_LIBRARIES)
|