c9b08e14e1
Utility/library for converting between different formats of e-books. initial port from Vadim Zhukov tweaks by me and sthen@, ok sthen@
51 lines
2.0 KiB
Plaintext
51 lines
2.0 KiB
Plaintext
$OpenBSD: patch-cmake_FindLibZip_cmake,v 1.1.1.1 2011/12/23 13:04:00 jasper Exp $
|
|
--- cmake/FindLibZip.cmake.orig Sun Apr 6 19:16:33 2008
|
|
+++ cmake/FindLibZip.cmake Fri Dec 23 12:19:54 2011
|
|
@@ -2,35 +2,29 @@
|
|
# Once done this will define
|
|
#
|
|
# LIBZIP_FOUND - system has the zip library
|
|
-# LIBZIP_INCLUDE_DIR - the zip include directory
|
|
-# LIBZIP_LIBRARY - Link this to use the zip library
|
|
+# LIBZIP_INCLUDE_DIRS - the zip include directory
|
|
+# LIBZIP_LIBRARIES - Link this to use the zip library
|
|
#
|
|
# Copyright (c) 2006, Pino Toscano, <toscano.pino@tiscali.it>
|
|
#
|
|
# Redistribution and use is allowed according to the terms of the BSD license.
|
|
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
|
|
|
-if (LIBZIP_LIBRARY AND LIBZIP_INCLUDE_DIR)
|
|
+if (LIBZIP_LIBRARIES AND LIBZIP_INCLUDE_DIRS)
|
|
# in cache already
|
|
set(LIBZIP_FOUND TRUE)
|
|
-else (LIBZIP_LIBRARY AND LIBZIP_INCLUDE_DIR)
|
|
+else (LIBZIP_LIBRARIES AND LIBZIP_INCLUDE_DIRS)
|
|
|
|
- find_path(LIBZIP_INCLUDE_DIR zip.h
|
|
- ${GNUWIN32_DIR}/include
|
|
- )
|
|
+ INCLUDE(FindPkgConfig)
|
|
+ pkg_check_modules(LIBZIP REQUIRED libzip)
|
|
|
|
- find_library(LIBZIP_LIBRARY NAMES zip
|
|
- PATHS
|
|
- ${GNUWIN32_DIR}/lib
|
|
- )
|
|
-
|
|
include(FindPackageHandleStandardArgs)
|
|
- FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibZip DEFAULT_MSG LIBZIP_LIBRARY LIBZIP_INCLUDE_DIR)
|
|
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibZip DEFAULT_MSG LIBZIP_LIBRARIES LIBZIP_INCLUDE_DIRS)
|
|
|
|
# ensure that they are cached
|
|
- set(LIBZIP_INCLUDE_DIR ${LIBZIP_INCLUDE_DIR} CACHE INTERNAL "The libzip include path")
|
|
- set(LIBZIP_LIBRARY ${LIBZIP_LIBRARY} CACHE INTERNAL "The libraries needed to use libzip")
|
|
+ set(LIBZIP_INCLUDE_DIRS ${LIBZIP_INCLUDE_DIRS} CACHE INTERNAL "The libzip include path")
|
|
+ set(LIBZIP_LIBRARIES ${LIBZIP_LIBRARIES} CACHE INTERNAL "The libraries needed to use libzip")
|
|
|
|
-endif (LIBZIP_LIBRARY AND LIBZIP_INCLUDE_DIR)
|
|
+endif (LIBZIP_LIBRARIES AND LIBZIP_INCLUDE_DIRS)
|
|
|
|
-mark_as_advanced(LIBZIP_INCLUDE_DIR LIBZIP_LIBRARY)
|
|
+mark_as_advanced(LIBZIP_INCLUDE_DIRS LIBZIP_LIBRARIES)
|