From 5d2c2b27a6323e2666378b986129b2a7c2c39e5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 6 Feb 2022 16:04:24 +0100 Subject: New upstream version 5.2.2GA --- CMake/FindLibzip.cmake | 60 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 43 insertions(+), 17 deletions(-) (limited to 'CMake/FindLibzip.cmake') diff --git a/CMake/FindLibzip.cmake b/CMake/FindLibzip.cmake index b6f1a9e..004a88d 100644 --- a/CMake/FindLibzip.cmake +++ b/CMake/FindLibzip.cmake @@ -10,23 +10,44 @@ # if(WIN32) - find_path( LIBZIP_INCLUDE_DIR_ZIP zip.h - PATHS - $ENV{XTCEXTERNALROOT}/x86/libzip - DOC "The directory where zip.h resides") - find_path( LIBZIP_INCLUDE_DIR_ZIPCONF zipconf.h - PATHS - $ENV{XTCEXTERNALROOT}/x86/libzip - DOC "The directory where zip.h resides") - find_library( LIBZIP_LIBRARY - NAMES zip Zip - PATHS - $ENV{XTCEXTERNALROOT}/x86/libzip - DOC "The libzip library") - find_file( LIBZIP_SHAREDLIB - NAMES zip.dll Zip.dll - PATHS - $ENV{XTCEXTERNALROOT}/x86/libzip) + # Folders for x86/x64 + if (WIN64) + find_path( LIBZIP_INCLUDE_DIR_ZIP zip.h + PATHS + $ENV{XTCEXTERNALROOT}/x64/libzip + DOC "The directory where zip.h resides") + find_path( LIBZIP_INCLUDE_DIR_ZIPCONF zipconf.h + PATHS + $ENV{XTCEXTERNALROOT}/x64/libzip + DOC "The directory where zip.h resides") + find_library( LIBZIP_LIBRARY + NAMES zip Zip + PATHS + $ENV{XTCEXTERNALROOT}/x64/libzip + DOC "The libzip library") + find_file( LIBZIP_SHAREDLIB + NAMES zip.dll Zip.dll + PATHS + $ENV{XTCEXTERNALROOT}/x64/libzip) + else (WIN64) + find_path( LIBZIP_INCLUDE_DIR_ZIP zip.h + PATHS + $ENV{XTCEXTERNALROOT}/x86/libzip + DOC "The directory where zip.h resides") + find_path( LIBZIP_INCLUDE_DIR_ZIPCONF zipconf.h + PATHS + $ENV{XTCEXTERNALROOT}/x86/libzip + DOC "The directory where zip.h resides") + find_library( LIBZIP_LIBRARY + NAMES zip Zip + PATHS + $ENV{XTCEXTERNALROOT}/x86/libzip + DOC "The libzip library") + find_file( LIBZIP_SHAREDLIB + NAMES zip.dll Zip.dll + PATHS + $ENV{XTCEXTERNALROOT}/x86/libzip) + endif (WIN64) else(WIN32) find_package(PkgConfig) pkg_check_modules(PC_LIBZIP QUIET libzip) @@ -39,8 +60,13 @@ else(WIN32) NAMES zipconf.h HINTS ${PC_LIBZIP_INCLUDE_DIRS}) +if(UNIX AND NOT APPLE) + find_library(LIBZIP_LIBRARY + NAMES libzip.a zip) +else(UNIX AND NOT APPLE) find_library(LIBZIP_LIBRARY NAMES zip) +endif(UNIX AND NOT APPLE) endif(WIN32) include(FindPackageHandleStandardArgs) -- cgit v1.2.3