mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-14 06:22:56 +08:00
[perfetto] initial port of 43.1 (#37959)
This commit is contained in:
parent
8d1bb02da0
commit
b4a3d89125
40
ports/perfetto/CMakeLists.txt
Normal file
40
ports/perfetto/CMakeLists.txt
Normal 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")
|
28
ports/perfetto/portfile.cmake
Normal file
28
ports/perfetto/portfile.cmake
Normal 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
19
ports/perfetto/vcpkg.json
Normal 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
|
||||
}
|
||||
]
|
||||
}
|
@ -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
|
||||
|
9
versions/p-/perfetto.json
Normal file
9
versions/p-/perfetto.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "db7cf7be562a134411d6aadaeef44df6e9758e6f",
|
||||
"version": "43.1",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user