forked from vesoft-inc/nebula
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFindFbthrift.cmake
33 lines (29 loc) · 962 Bytes
/
FindFbthrift.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 Fbthrift includes dirs and libraries
#
# Usage of this module as follows:
#
# find_package(Fbthrift)
#
# 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:
#
# Fbthrift_FOUND System has fbthrift, thrift1 and include and lib dirs found.
# Fbthrift_INCLUDE_DIR The fbthrift includes directories.
# Fbthrift_LIBRARY The fbthrift library.
# Fbthrift_BIN The fbthrift binary.
find_path(Fbthrift_INCLUDE_DIR NAMES thrift)
find_library(Fbthrift_LIBRARY NAMES libthrift.a)
find_program(Fbthrift_BIN NAMES thrift1)
if(Fbthrift_INCLUDE_DIR AND Fbthrift_LIBRARY AND Fbthrift_BIN)
set(Fbthrift_FOUND TRUE)
mark_as_advanced(
Fbthrift_INCLUDE_DIR
Fbthrift_LIBRARY
Fbthrift_BIN
)
endif()
if(NOT Fbthrift_FOUND)
message(FATAL_ERROR "Fbthrift doesn't exist")
endif()