Mercurial > malikania
comparison cmake/packages/FindZIP.cmake @ 30:a1e80d991968
Misc: convert to spaces, #519
author | David Demelier <markand@malikania.fr> |
---|---|
date | Thu, 16 Jun 2016 13:35:31 +0200 |
parents | 8991989c4708 |
children | d4f5f7231b84 |
comparison
equal
deleted
inserted
replaced
29:99792c6c8b06 | 30:a1e80d991968 |
---|---|
8 # ZIP_FOUND, if it is found | 8 # ZIP_FOUND, if it is found |
9 | 9 |
10 find_package(ZLIB QUIET) | 10 find_package(ZLIB QUIET) |
11 | 11 |
12 find_path( | 12 find_path( |
13 ZIP_INCLUDE_DIR | 13 ZIP_INCLUDE_DIR |
14 NAMES zip.h | 14 NAMES zip.h |
15 ) | 15 ) |
16 | 16 |
17 find_library( | 17 find_library( |
18 ZIP_LIBRARY | 18 ZIP_LIBRARY |
19 NAMES zip libzip | 19 NAMES zip libzip |
20 ) | 20 ) |
21 | 21 |
22 find_path( | 22 find_path( |
23 ZIPCONF_INCLUDE_DIR | 23 ZIPCONF_INCLUDE_DIR |
24 NAMES zipconf.h | 24 NAMES zipconf.h |
25 ) | 25 ) |
26 | 26 |
27 if (NOT ZIPCONF_INCLUDE_DIR) | 27 if (NOT ZIPCONF_INCLUDE_DIR) |
28 # zipconf.h is sometimes directly in the include/ folder but on some systems | 28 # zipconf.h is sometimes directly in the include/ folder but on some systems |
29 # like Windows, it is installed in the lib/ directory. | 29 # like Windows, it is installed in the lib/ directory. |
30 get_filename_component(_ZIP_PRIVATE_LIBRARY "${ZIP_LIBRARY}" DIRECTORY) | 30 get_filename_component(_ZIP_PRIVATE_LIBRARY "${ZIP_LIBRARY}" DIRECTORY) |
31 | 31 |
32 find_path( | 32 find_path( |
33 ZIPCONF_INCLUDE_DIR | 33 ZIPCONF_INCLUDE_DIR |
34 NAMES zipconf.h | 34 NAMES zipconf.h |
35 PATHS "${_ZIP_PRIVATE_LIBRARY}/libzip/include" | 35 PATHS "${_ZIP_PRIVATE_LIBRARY}/libzip/include" |
36 ) | 36 ) |
37 endif () | 37 endif () |
38 | 38 |
39 include(FindPackageHandleStandardArgs) | 39 include(FindPackageHandleStandardArgs) |
40 | 40 |
41 find_package_handle_standard_args( | 41 find_package_handle_standard_args( |
42 ZIP | 42 ZIP |
43 REQUIRED_VARS ZLIB_LIBRARIES ZLIB_INCLUDE_DIRS ZIP_LIBRARY ZIP_INCLUDE_DIR ZIPCONF_INCLUDE_DIR | 43 REQUIRED_VARS ZLIB_LIBRARIES ZLIB_INCLUDE_DIRS ZIP_LIBRARY ZIP_INCLUDE_DIR ZIPCONF_INCLUDE_DIR |
44 ) | 44 ) |
45 | 45 |
46 if (ZIP_FOUND) | 46 if (ZIP_FOUND) |
47 set(ZIP_LIBRARIES ${ZIP_LIBRARY} ${ZLIB_LIBRARIES}) | 47 set(ZIP_LIBRARIES ${ZIP_LIBRARY} ${ZLIB_LIBRARIES}) |
48 set(ZIP_INCLUDE_DIRS ${ZIP_INCLUDE_DIR} ${ZIPCONF_INCLUDE_DIR} ${ZLIB_INCLUDE_DIRS}) | 48 set(ZIP_INCLUDE_DIRS ${ZIP_INCLUDE_DIR} ${ZIPCONF_INCLUDE_DIR} ${ZLIB_INCLUDE_DIRS}) |
49 endif () | 49 endif () |
50 | 50 |
51 mark_as_advanced(ZIP_LIBRARY ZIP_INCLUDE_DIR ZIPCONF_INCLUDE_DIR) | 51 mark_as_advanced(ZIP_LIBRARY ZIP_INCLUDE_DIR ZIPCONF_INCLUDE_DIR) |