summaryrefslogtreecommitdiff
path: root/CMake/FindLibzip.cmake
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2022-02-06 16:04:38 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2022-02-06 16:04:38 +0100
commitd0ca838c7ab297036b4a7c45351761a48fe05efd (patch)
treef0f3cc006e8157d6bd699bd644b7dd7b35387ac2 /CMake/FindLibzip.cmake
parentfd6639655b399a79fb72f494786a4f57da9c90e7 (diff)
parent5d2c2b27a6323e2666378b986129b2a7c2c39e5c (diff)
Update upstream source from tag 'upstream/5.2.2GA'
Update to upstream version '5.2.2GA' with Debian dir 9c80045d0b4f9e463647bc8af8c090a673df4132
Diffstat (limited to 'CMake/FindLibzip.cmake')
-rw-r--r--CMake/FindLibzip.cmake60
1 files changed, 43 insertions, 17 deletions
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)