# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

folly_add_library(
  NAME dwarf
  HEADERS
    Dwarf.h
    DwarfImpl.h
    DwarfLineNumberVM.h
    DwarfSection.h
    DwarfUtil.h
  EXPORTED_DEPS
    folly_debugging_symbolizer_dwarf
)

folly_add_library(
  NAME elf
  HEADERS
    Elf-inl.h
    Elf.h
  EXPORTED_DEPS
    folly_debugging_symbolizer_elf
)

folly_add_library(
  NAME symbolized_frame
  HEADERS
    SymbolizedFrame.h
  EXPORTED_DEPS
    folly_debugging_symbolizer_symbolized_frame
)

folly_add_library(
  NAME line_reader
  HEADERS
    LineReader.h
  EXPORTED_DEPS
    folly_debugging_symbolizer_line_reader
)

folly_add_library(
  NAME stack_trace
  HEADERS
    StackTrace.h
  EXPORTED_DEPS
    folly_debugging_symbolizer_stack_trace
)

folly_add_library(
  NAME elf_cache
  HEADERS
    ElfCache.h
  EXPORTED_DEPS
    folly_debugging_symbolizer_elf_cache
)

folly_add_library(
  NAME symbolize_printer
  HEADERS
    SymbolizePrinter.h
  EXPORTED_DEPS
    folly_debugging_symbolizer_symbolize_printer
)

folly_add_library(
  NAME symbolizer
  HEADERS
    Symbolizer.h
  EXPORTED_DEPS
    folly_debugging_symbolizer_symbolizer
)

folly_add_library(
  NAME signal_handler
  HEADERS
    SignalHandler.h
  EXPORTED_DEPS
    folly_debugging_symbolizer_signal_handler
)

add_subdirectory(detail)
