early-access version 2853

This commit is contained in:
pineappleEA
2022-07-23 03:01:36 +02:00
parent 1f2b5081b5
commit 1f111bb69c
8955 changed files with 418777 additions and 999 deletions

View File

@@ -0,0 +1,71 @@
cmake_minimum_required(VERSION 3.11)
project(presentmon)
option(INSTALL_HEADERS "Install presentmon headers" ON)
option(BUILD_TOOLS "Build tool PresentMon" OFF)
set(PRESENTDATA_SRCS
PresentData/Debug.cpp
PresentData/MixedRealityTraceConsumer.cpp
PresentData/PresentMonTraceConsumer.cpp
PresentData/TraceConsumer.cpp
PresentData/TraceSession.cpp
)
set(PRESENTDATA_HDRS
PresentData/Debug.hpp
PresentData/MixedRealityTraceConsumer.hpp
PresentData/PresentMonTraceConsumer.hpp
PresentData/TraceConsumer.hpp
PresentData/TraceSession.hpp
${CMAKE_BINARY_DIR}/generated/version.h
)
file(GLOB EXTRA_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/PresentData/ETW/*.h)
file(WRITE ${CMAKE_BINARY_DIR}/generated/version.h "char const* PRESENT_MON_VERSION = \"1.7.0\";")
add_library(PresentData STATIC ${PRESENTDATA_SRCS} ${PRESENTDATA_HDRS} ${EXTRA_INCLUDES})
target_include_directories(PresentData PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/PresentData>
$<INSTALL_INTERFACE:include/presentmon>
)
target_compile_definitions(PresentData PRIVATE UNICODE)
# Install targets
install(TARGETS PresentData
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
if (BUILD_TOOLS)
set(PresentMon_SRCS
PresentMon/CommandLine.cpp
PresentMon/Console.cpp
PresentMon/ConsumerThread.cpp
PresentMon/CsvOutput.cpp
PresentMon/LateStageReprojectionData.cpp
PresentMon/MainThread.cpp
PresentMon/OutputThread.cpp
PresentMon/Privilege.cpp
PresentMon/TraceSession.cpp
)
add_executable(PresentMon ${PresentMon_SRCS})
target_include_directories(PresentMon PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/PresentMon ${CMAKE_BINARY_DIR})
target_compile_definitions(PresentMon PRIVATE UNICODE)
target_link_libraries(PresentMon PRIVATE PresentData Tdh Shlwapi)
install(TARGETS PresentMon
RUNTIME DESTINATION bin
)
endif()
# Install headers
if (INSTALL_HEADERS)
install(FILES ${PRESENTDATA_HDRS} DESTINATION include/presentmon)
install(FILES ${EXTRA_INCLUDES} DESTINATION include/presentmon/ETW)
endif()

View File

@@ -0,0 +1,33 @@
# The upstream doesn't export any symbols
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO GameTechDev/PresentMon
REF 47669ad0efaddc9787772d5e4900734417b2c07c # 1.7.0
SHA512 fac2e2ca4d8476e2cdde7c3f77cf1881b7d7a9208387f12dbf07f3ea7f4012ce79602f4fedbf1e778871fd9ce898b101659a6f192de29dc6a4404213aee444be
HEAD_REF main
)
file(COPY ${CURRENT_PORT_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
tools BUILD_TOOLS
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS ${FEATURE_OPTIONS}
OPTIONS_DEBUG
-DINSTALL_HEADERS=OFF
)
vcpkg_install_cmake()
if("tools" IN_LIST FEATURES)
vcpkg_copy_tools(TOOL_NAMES presentmon AUTO_CLEAN)
endif()
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

12
externals/vcpkg/ports/presentmon/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,12 @@
{
"name": "presentmon",
"version-semver": "1.7.0",
"port-version": 1,
"description": "PresentMon is a tool to capture and analyze ETW events related to swap chain presentation on Windows.",
"supports": "windows & !uwp",
"features": {
"tools": {
"description": "Build tool PresentMon"
}
}
}