diff options
author | Markus Wick <markus@selfnet.de> | 2020-05-09 11:14:47 +0200 |
---|---|---|
committer | Markus Wick <markus@selfnet.de> | 2020-05-09 12:47:59 +0200 |
commit | ef1f59659552f516b3d3255af66f9c9151966611 (patch) | |
tree | 48cef08c4590ca0a9ec23ef99158e49bbe59fe6a | |
parent | Check for the zstd version (diff) | |
download | yuzu-ef1f59659552f516b3d3255af66f9c9151966611.tar yuzu-ef1f59659552f516b3d3255af66f9c9151966611.tar.gz yuzu-ef1f59659552f516b3d3255af66f9c9151966611.tar.bz2 yuzu-ef1f59659552f516b3d3255af66f9c9151966611.tar.lz yuzu-ef1f59659552f516b3d3255af66f9c9151966611.tar.xz yuzu-ef1f59659552f516b3d3255af66f9c9151966611.tar.zst yuzu-ef1f59659552f516b3d3255af66f9c9151966611.zip |
Diffstat (limited to '')
-rw-r--r-- | externals/find-modules/FindLibzip.cmake | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/externals/find-modules/FindLibzip.cmake b/externals/find-modules/FindLibzip.cmake index 0b5148856..f36b1687a 100644 --- a/externals/find-modules/FindLibzip.cmake +++ b/externals/find-modules/FindLibzip.cmake @@ -28,26 +28,27 @@ find_library(LIBZIP_LIBRARY "$ENV{LIB_DIR}/lib" "$ENV{LIB}" /usr/local/lib /usr/lib ) -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Libzip - FOUND_VAR LIBZIP_FOUND - REQUIRED_VARS - LIBZIP_LIBRARY - LIBZIP_INCLUDE_DIR - LIBZIP_INCLUDE_DIR_ZIPCONF -) - -set(LIBZIP_VERSION 0) - if (LIBZIP_INCLUDE_DIR_ZIPCONF) FILE(READ "${LIBZIP_INCLUDE_DIR_ZIPCONF}/zipconf.h" _LIBZIP_VERSION_CONTENTS) if (_LIBZIP_VERSION_CONTENTS) STRING(REGEX REPLACE ".*#define LIBZIP_VERSION \"([0-9.]+)\".*" "\\1" LIBZIP_VERSION "${_LIBZIP_VERSION_CONTENTS}") endif() + unset(_LIBZIP_VERSION_CONTENTS) endif() set(LIBZIP_VERSION ${LIBZIP_VERSION} CACHE STRING "Version number of libzip") +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Libzip + FOUND_VAR LIBZIP_FOUND + REQUIRED_VARS + LIBZIP_LIBRARY + LIBZIP_INCLUDE_DIR + LIBZIP_INCLUDE_DIR_ZIPCONF + LIBZIP_VERSION + VERSION_VAR LIBZIP_VERSION +) + if(LIBZIP_FOUND) set(LIBZIP_LIBRARIES ${LIBZIP_LIBRARY}) set(LIBZIP_INCLUDE_DIRS ${LIBZIP_INCLUDE_DIR}) @@ -65,5 +66,7 @@ endif() mark_as_advanced( LIBZIP_INCLUDE_DIR + LIBZIP_INCLUDE_DIR_ZIPCONF LIBZIP_LIBRARY + LIBZIP_VERSION ) |