Conditionally find_dependency(libdwarf)

This commit is contained in:
Jeremy 2023-11-15 00:34:45 -05:00
parent c6ea891629
commit bb487d3e56
No known key found for this signature in database
GPG Key ID: BE03111EB7ED6E2E

View File

@ -2,13 +2,15 @@
@PACKAGE_INIT@ @PACKAGE_INIT@
# Dependencies # Dependencies
include(CMakeFindDependencyMacro) if(@CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF@)
find_dependency(libdwarf REQUIRED) include(CMakeFindDependencyMacro)
find_dependency(libdwarf REQUIRED)
endif()
# We cannot modify an existing IMPORT target # We cannot modify an existing IMPORT target
if(NOT TARGET assert::assert) if(NOT TARGET assert::assert)
# import targets # import targets
include("${CMAKE_CURRENT_LIST_DIR}/@package_name@-targets.cmake") include("${CMAKE_CURRENT_LIST_DIR}/@package_name@-targets.cmake")
endif() endif()