Debian Codegraph @

thirdparty/folly/build/fbcode_builder/CMake/FindLibUnwind.cmake

raw
1 # Copyright (c) Facebook, Inc. and its affiliates.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 find_path(LIBUNWIND_INCLUDE_DIR NAMES libunwind.h)
16 mark_as_advanced(LIBUNWIND_INCLUDE_DIR)
17
18 find_library(LIBUNWIND_LIBRARY NAMES unwind)
19 mark_as_advanced(LIBUNWIND_LIBRARY)
20
21 include(FindPackageHandleStandardArgs)
22 FIND_PACKAGE_HANDLE_STANDARD_ARGS(
23 LIBUNWIND
24 REQUIRED_VARS LIBUNWIND_LIBRARY LIBUNWIND_INCLUDE_DIR)
25
26 if(LIBUNWIND_FOUND)
27 set(LIBUNWIND_LIBRARIES ${LIBUNWIND_LIBRARY})
28 set(LIBUNWIND_INCLUDE_DIRS ${LIBUNWIND_INCLUDE_DIR})
29 endif()