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:24 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2022-02-06 16:04:24 +0100
commit5d2c2b27a6323e2666378b986129b2a7c2c39e5c (patch)
treece8982b6c0111f79791068de2c2d4c6ce3138a49 /CMake/FindLibzip.cmake
parentb623f5953691b2a0614e6f1f4def86bdbb9a4113 (diff)
New upstream version 5.2.2GAupstream/5.2.2GA
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)