]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | # - Find Snappy |
2 | # Find the snappy compression library and includes | |
3 | # | |
f67539c2 TL |
4 | # snappy_INCLUDE_DIRS - where to find snappy.h, etc. |
5 | # snappy_LIBRARIES - List of libraries when using snappy. | |
6 | # snappy_FOUND - True if snappy found. | |
7c673cae | 7 | |
f67539c2 | 8 | find_path(snappy_INCLUDE_DIRS |
7c673cae | 9 | NAMES snappy.h |
f67539c2 | 10 | HINTS ${snappy_ROOT_DIR}/include) |
7c673cae | 11 | |
f67539c2 | 12 | find_library(snappy_LIBRARIES |
7c673cae | 13 | NAMES snappy |
f67539c2 | 14 | HINTS ${snappy_ROOT_DIR}/lib) |
7c673cae FG |
15 | |
16 | include(FindPackageHandleStandardArgs) | |
f67539c2 | 17 | find_package_handle_standard_args(snappy DEFAULT_MSG snappy_LIBRARIES snappy_INCLUDE_DIRS) |
7c673cae FG |
18 | |
19 | mark_as_advanced( | |
f67539c2 TL |
20 | snappy_LIBRARIES |
21 | snappy_INCLUDE_DIRS) | |
22 | ||
23 | if(snappy_FOUND AND NOT (TARGET snappy::snappy)) | |
24 | add_library (snappy::snappy UNKNOWN IMPORTED) | |
25 | set_target_properties(snappy::snappy | |
26 | PROPERTIES | |
27 | IMPORTED_LOCATION ${snappy_LIBRARIES} | |
28 | INTERFACE_INCLUDE_DIRECTORIES ${snappy_INCLUDE_DIRS}) | |
29 | endif() |