diff options
author | sanine <sanine.not@pm.me> | 2022-03-04 10:47:15 -0600 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2022-03-04 10:47:15 -0600 |
commit | 058f98a63658dc1a2579826ba167fd61bed1e21f (patch) | |
tree | bcba07a1615a14d943f3af3f815a42f3be86b2f3 /src/mesh/assimp-master/cmake-modules/FindZLIB.cmake | |
parent | 2f8028ac9e0812cb6f3cbb08f0f419e4e717bd22 (diff) |
add assimp submodule
Diffstat (limited to 'src/mesh/assimp-master/cmake-modules/FindZLIB.cmake')
-rw-r--r-- | src/mesh/assimp-master/cmake-modules/FindZLIB.cmake | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/mesh/assimp-master/cmake-modules/FindZLIB.cmake b/src/mesh/assimp-master/cmake-modules/FindZLIB.cmake new file mode 100644 index 0000000..95eb515 --- /dev/null +++ b/src/mesh/assimp-master/cmake-modules/FindZLIB.cmake @@ -0,0 +1,48 @@ +#------------------------------------------------------------------- +# This file is part of the CMake build system for OGRE +# (Object-oriented Graphics Rendering Engine) +# For the latest info, see http://www.ogre3d.org/ +# +# The contents of this file are placed in the public domain. Feel +# free to make use of it in any way you like. +#------------------------------------------------------------------- + +# - Try to find ZLIB +# Once done, this will define +# +# ZLIB_FOUND - system has ZLIB +# ZLIB_INCLUDE_DIRS - the ZLIB include directories +# ZLIB_LIBRARIES - link these to use ZLIB + +include(FindPkgMacros) +findpkg_begin(ZLIB) + +# Get path, convert backslashes as ${ENV_${var}} +getenv_path(ZLIB_HOME) + +# construct search paths +set(ZLIB_PREFIX_PATH ${ZLIB_HOME} ${ENV_ZLIB_HOME}) +create_search_paths(ZLIB) +# redo search if prefix path changed +clear_if_changed(ZLIB_PREFIX_PATH + ZLIB_LIBRARY_FWK + ZLIB_LIBRARY_REL + ZLIB_LIBRARY_DBG + ZLIB_INCLUDE_DIR +) + +set(ZLIB_LIBRARY_NAMES z zlib zdll) +get_debug_names(ZLIB_LIBRARY_NAMES) + +use_pkgconfig(ZLIB_PKGC zzip-zlib-config) + +findpkg_framework(ZLIB) + +find_path(ZLIB_INCLUDE_DIR NAMES zlib.h HINTS ${ZLIB_INC_SEARCH_PATH} ${ZLIB_PKGC_INCLUDE_DIRS}) +find_library(ZLIB_LIBRARY_REL NAMES ${ZLIB_LIBRARY_NAMES} HINTS ${ZLIB_LIB_SEARCH_PATH} ${ZLIB_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" release relwithdebinfo minsizerel) +find_library(ZLIB_LIBRARY_DBG NAMES ${ZLIB_LIBRARY_NAMES_DBG} HINTS ${ZLIB_LIB_SEARCH_PATH} ${ZLIB_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" debug) + +make_library_set(ZLIB_LIBRARY) + +findpkg_finish(ZLIB) + |