59 lines
2.2 KiB
Diff
59 lines
2.2 KiB
Diff
--- bloaty-1.1/CMakeLists.txt 2020-05-24 06:43:55.000000000 +0200
|
|
+++ - 2023-07-08 13:07:06.559266321 +0200
|
|
@@ -35,6 +35,12 @@
|
|
MESSAGE(STATUS "pkg-config not found, using bundled dependencies")
|
|
endif(${PKG_CONFIG_FOUND})
|
|
endif(UNIX)
|
|
+find_package(absl CONFIG)
|
|
+if(absl_FOUND)
|
|
+ MESSAGE(STATUS "System absl found, using")
|
|
+else()
|
|
+ MESSAGE(STATUS "System absl not found, using bundled version")
|
|
+endif()
|
|
|
|
# Set default build type.
|
|
if(NOT CMAKE_BUILD_TYPE)
|
|
@@ -89,7 +95,6 @@
|
|
|
|
include_directories(.)
|
|
include_directories(src)
|
|
-include_directories(third_party/abseil-cpp)
|
|
include_directories("${CMAKE_CURRENT_BINARY_DIR}/src")
|
|
|
|
# Baseline build flags.
|
|
@@ -159,24 +164,6 @@
|
|
src/macho.cc
|
|
src/range_map.cc
|
|
src/webassembly.cc
|
|
- # Until Abseil has a proper CMake build system
|
|
- third_party/abseil-cpp/absl/base/internal/raw_logging.cc # Grrrr...
|
|
- third_party/abseil-cpp/absl/base/internal/throw_delegate.cc
|
|
- third_party/abseil-cpp/absl/numeric/int128.cc
|
|
- third_party/abseil-cpp/absl/strings/ascii.cc
|
|
- third_party/abseil-cpp/absl/strings/charconv.cc
|
|
- third_party/abseil-cpp/absl/strings/escaping.cc
|
|
- third_party/abseil-cpp/absl/strings/internal/charconv_bigint.cc
|
|
- third_party/abseil-cpp/absl/strings/internal/charconv_parse.cc
|
|
- third_party/abseil-cpp/absl/strings/internal/memutil.cc
|
|
- third_party/abseil-cpp/absl/strings/internal/utf8.cc
|
|
- third_party/abseil-cpp/absl/strings/match.cc
|
|
- third_party/abseil-cpp/absl/strings/numbers.cc
|
|
- third_party/abseil-cpp/absl/strings/str_cat.cc
|
|
- third_party/abseil-cpp/absl/strings/string_view.cc
|
|
- third_party/abseil-cpp/absl/strings/str_split.cc
|
|
- third_party/abseil-cpp/absl/strings/substitute.cc
|
|
- third_party/abseil-cpp/absl/types/bad_optional_access.cc
|
|
# One source file, no special build system needed.
|
|
third_party/demumble/third_party/libcxxabi/cxa_demangle.cpp
|
|
)
|
|
@@ -214,6 +201,9 @@
|
|
endif(${PROTOBUF_FOUND})
|
|
endif(UNIX)
|
|
|
|
+list(APPEND LIBBLOATY_LIBS absl::strings)
|
|
+list(APPEND LIBBLOATY_LIBS absl::optional)
|
|
+
|
|
if(DEFINED ENV{LIB_FUZZING_ENGINE})
|
|
message("LIB_FUZZING_ENGINE set, building fuzz_target instead of Bloaty")
|
|
add_executable(fuzz_target tests/fuzz_target.cc)
|