summaryrefslogtreecommitdiff
path: root/DevIL/cmake/Modules/FindMNG.cmake
diff options
context:
space:
mode:
authorDenton Woods <denton.woods@gmail.com>2016-12-31 17:07:17 -0600
committerDenton Woods <denton.woods@gmail.com>2016-12-31 17:07:17 -0600
commit1d2e29a8fec0f0e81c346e5ada45d5f0ba813c46 (patch)
tree6aecd33efa7e3e415f32470e9a86fa753a1f0a8d /DevIL/cmake/Modules/FindMNG.cmake
parent6b2c9efecf3c2b04cc8942f30c3549cccc5be155 (diff)
downloaddevil-1d2e29a8fec0f0e81c346e5ada45d5f0ba813c46.tar.gz
- Fixed libmng in CMakeCache
- Fixed tiff warnings
Diffstat (limited to 'DevIL/cmake/Modules/FindMNG.cmake')
-rw-r--r--DevIL/cmake/Modules/FindMNG.cmake36
1 files changed, 8 insertions, 28 deletions
diff --git a/DevIL/cmake/Modules/FindMNG.cmake b/DevIL/cmake/Modules/FindMNG.cmake
index 019f33c9..5f1bb1aa 100644
--- a/DevIL/cmake/Modules/FindMNG.cmake
+++ b/DevIL/cmake/Modules/FindMNG.cmake
@@ -1,30 +1,10 @@
-# Denton: Found at https://github.com/realhidden/stratagus/blob/master/cmake/modules/FindMNG.cmake
-#
-# - Try to find the MNG library
-# Once done this will define
-#
-# MNG_FOUND - system has Mikmod
-# MNG_INCLUDE_DIR - the Mikmod include directory
-# MNG_LIBRARY - The Mikmod library
+# Denton: Modified from the libsquish one
+FIND_PATH(MNG_INCLUDE_DIR mng.h PATHS . mng .. ../mng DOC "Directory containing libmng headers")
+FIND_LIBRARY(MNG_LIBRARY NAMES mng libmng PATHS . mng .. ../mng PATH_SUFFIXES lib lib64 release minsizerel relwithdebinfo DOC "Path to libmng library")
-# Copyright (c) 2011, Pali Rohár <pali.rohar@gmail.com>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+SET(MNG_LIBRARIES ${MNG_LIBRARY})
-if(MNG_INCLUDE_DIR AND MNG_LIBRARY)
- set(MNG_FOUND true)
-else()
- find_path(MNG_INCLUDE_DIR libmng.h)
- find_library(MNG_LIBRARY NAMES mng)
-
- if(MNG_INCLUDE_DIR AND MNG_LIBRARY)
- set(MNG_FOUND true)
- message(STATUS "Found MNG: ${MNG_LIBRARY}")
- else()
- set(MNG_FOUND false)
- message(STATUS "Could not find MNG")
- endif()
-
- mark_as_advanced(MNG_INCLUDE_DIR MNG_LIBRARY)
-endif()
+IF (MNG_LIBRARY AND MNG_INCLUDE_DIR)
+ SET(MNG_FOUND TRUE)
+ MESSAGE(STATUS "Found libmng: ${MNG_LIBRARY}")
+ENDIF (MNG_LIBRARY AND MNG_INCLUDE_DIR)