forked from vesoft-inc/nebula
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFindBzip2.cmake
34 lines (29 loc) · 881 Bytes
/
FindBzip2.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# - Try to find Bzip2 includes dirs and libraries
#
# Usage of this module as follows:
#
# find_package(Bzip2)
#
# Variables used by this module, they can change the default behaviour and need
# to be set before calling find_package:
#
# Variables defined by this module:
#
# Bzip2_FOUND System has bzip2, include and lib dirs found.
# Bzip2_INCLUDE_DIR The bzip2 includes directories.
# Bzip2_LIBRARY The bzip2 library.
# Bzip2_BIN The bzip2 binary.
find_path(Bzip2_INCLUDE_DIR NAMES bzlib.h)
find_library(Bzip2_LIBRARY NAMES libbz2.a)
find_program(Bzip2_BIN NAMES bzip2)
if(Bzip2_INCLUDE_DIR AND Bzip2_LIBRARY AND Bzip2_BIN)
set(Bzip2_FOUND TRUE)
mark_as_advanced(
Bzip2_INCLUDE_DIR
Bzip2_LIBRARY
Bzip2_BIN
)
endif()
if(NOT Bzip2_FOUND)
message(FATAL_ERROR "Bzip2 doesn't exist")
endif()