cmake: Improve use of percetto

This commit is contained in:
Ryan Pavlik 2021-05-18 11:39:41 -05:00
parent 9626a8d575
commit 995866a576
2 changed files with 3 additions and 4 deletions

View file

@ -145,7 +145,7 @@ endforeach()
option(BUILD_TESTING "Enable building of the test suite?" ON)
option(XRT_FEATURE_COLOR_LOG "Enable logging in color on supported platforms" ON)
option(XRT_FEATURE_TRACING "Enable debug tracing on supported platforms" OFF)
cmake_dependent_option(XRT_FEATURE_TRACING "Enable debug tracing on supported platforms" OFF "XRT_HAVE_PERCETTO" OFF)
cmake_dependent_option(CMAKE_INTERPROCEDURAL_OPTIMIZATION "Enable inter-procedural (link-time) optimization" OFF "HAS_IPO" OFF)
cmake_dependent_option(XRT_HAVE_WAYLAND "Enable Wayland support" ON "WAYLAND_FOUND AND WAYLAND_SCANNER_FOUND AND WAYLAND_PROTOCOLS_FOUND AND LIBDRM_FOUND" OFF)

View file

@ -242,9 +242,8 @@ else()
target_link_libraries(aux_util PUBLIC xrt-external-cjson)
endif()
# For u_trace_marker
if(XRT_HAVE_PERCETTO)
target_link_libraries(aux_util PRIVATE ${PERCETTO_LINK_LIBRARIES})
target_include_directories(aux_util PUBLIC ${PERCETTO_INCLUDE_DIRS})
if(XRT_FEATURE_TRACING AND XRT_HAVE_PERCETTO)
target_link_libraries(aux_util PUBLIC Percetto::percetto)
endif()
if(XRT_HAVE_LIBBSD)
target_include_directories(aux_util SYSTEM PRIVATE ${LIBBSD_INCLUDE_DIRS})