[perfetto] initial port of 43.1 (#37959)

This commit is contained in:
Ryan Zoeller 2024-04-15 14:35:24 -05:00 committed by GitHub
parent 8d1bb02da0
commit b4a3d89125
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 100 additions and 0 deletions

View File

@ -0,0 +1,40 @@
# Unofficial perfetto CMakeLists.txt from https://github.com/google/perfetto/blob/v43.1/meson.build
cmake_minimum_required(VERSION 3.23)
project(perfetto LANGUAGES CXX)
add_library(perfetto)
target_compile_features(perfetto PRIVATE cxx_std_17)
target_sources(perfetto
PRIVATE "sdk/perfetto.cc"
PUBLIC FILE_SET HEADERS BASE_DIRS "sdk" FILES "sdk/perfetto.h"
)
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
find_package(Threads REQUIRED)
target_link_libraries(perfetto PRIVATE Threads::Threads)
if(ANDROID)
target_link_libraries(perfetto PRIVATE log)
endif(ANDROID)
if(WIN32)
target_compile_options(perfetto PRIVATE "/bigobj")
target_compile_definitions(perfetto PRIVATE WIN32_LEAN_AND_MEAN NOMINMAX)
target_link_libraries(perfetto PRIVATE ws2_32)
endif(WIN32)
if(MSVC)
target_compile_options(perfetto PRIVATE "/permissive-")
endif(MSVC)
install(TARGETS perfetto
EXPORT unofficial-perfetto-config
FILE_SET HEADERS DESTINATION "include"
)
install(EXPORT unofficial-perfetto-config
NAMESPACE unofficial::perfetto::
DESTINATION "share/unofficial-perfetto"
)
install(FILES "protos/perfetto/trace/perfetto_trace.proto" DESTINATION "share/unofficial-perfetto")

View File

@ -0,0 +1,28 @@
if (VCPKG_TARGET_IS_WINDOWS)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO google/perfetto
REF "v${VERSION}"
SHA512 9ad6f314e6e56558f7062290afef840d81689776bf3a31708a61fef9ea8d80ac00892b5316856adc784b17e71c67a8429500602b301958ccba24fc4a3b6ac6f8
HEAD_REF main
)
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-${PORT})
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share"
)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

19
ports/perfetto/vcpkg.json Normal file
View File

@ -0,0 +1,19 @@
{
"name": "perfetto",
"version": "43.1",
"description": "System profiling, app tracing and trace analysis",
"homepage": "https://perfetto.dev",
"license": "Apache-2.0",
"supports": "!uwp & !x86",
"dependencies": [
"pthreads",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}

View File

@ -6728,6 +6728,10 @@
"baseline": "2.8.3",
"port-version": 3
},
"perfetto": {
"baseline": "43.1",
"port-version": 0
},
"pffft": {
"baseline": "2021-10-09",
"port-version": 1

View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "db7cf7be562a134411d6aadaeef44df6e9758e6f",
"version": "43.1",
"port-version": 0
}
]
}