Only deal with zstd if not using CPPTRACE_USE_EXTERNAL_LIBDWARF
This commit is contained in:
parent
a162423800
commit
b7d14bc952
@ -338,11 +338,14 @@ endif()
|
|||||||
|
|
||||||
if(CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF)
|
if(CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF)
|
||||||
target_compile_definitions(${target_name} PUBLIC CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF)
|
target_compile_definitions(${target_name} PUBLIC CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF)
|
||||||
|
if(CPPTRACE_USE_EXTERNAL_LIBDWARF)
|
||||||
|
find_package(libdwarf REQUIRED)
|
||||||
|
else()
|
||||||
|
include(FetchContent)
|
||||||
# First, dependencies: Zstd and zlib (currently relying on system zlib)
|
# First, dependencies: Zstd and zlib (currently relying on system zlib)
|
||||||
if(CPPTRACE_USE_EXTERNAL_ZSTD)
|
if(CPPTRACE_USE_EXTERNAL_ZSTD)
|
||||||
find_package(zstd)
|
find_package(zstd)
|
||||||
else()
|
else()
|
||||||
include(FetchContent)
|
|
||||||
cmake_policy(SET CMP0074 NEW)
|
cmake_policy(SET CMP0074 NEW)
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
zstd
|
zstd
|
||||||
@ -365,13 +368,9 @@ if(CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
# Libdwarf itself
|
# Libdwarf itself
|
||||||
if(CPPTRACE_USE_EXTERNAL_LIBDWARF)
|
|
||||||
find_package(libdwarf REQUIRED)
|
|
||||||
else()
|
|
||||||
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
|
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
|
||||||
# set(PIC_ALWAYS TRUE)
|
# set(PIC_ALWAYS TRUE)
|
||||||
# set(BUILD_DWARFDUMP FALSE)
|
# set(BUILD_DWARFDUMP FALSE)
|
||||||
include(FetchContent)
|
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
libdwarf
|
libdwarf
|
||||||
# GIT_REPOSITORY https://github.com/davea42/libdwarf-code.git
|
# GIT_REPOSITORY https://github.com/davea42/libdwarf-code.git
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user