diff options
Diffstat (limited to 'vcpkg/ports/winpixevent')
| -rw-r--r-- | vcpkg/ports/winpixevent/portfile.cmake | 41 | ||||
| -rw-r--r-- | vcpkg/ports/winpixevent/usage | 4 | ||||
| -rw-r--r-- | vcpkg/ports/winpixevent/vcpkg.json | 9 | ||||
| -rw-r--r-- | vcpkg/ports/winpixevent/winpixevent-config.cmake.in | 11 |
4 files changed, 65 insertions, 0 deletions
diff --git a/vcpkg/ports/winpixevent/portfile.cmake b/vcpkg/ports/winpixevent/portfile.cmake new file mode 100644 index 0000000..11abcc2 --- /dev/null +++ b/vcpkg/ports/winpixevent/portfile.cmake @@ -0,0 +1,41 @@ +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_download_distfile(ARCHIVE + URLS "https://www.nuget.org/api/v2/package/WinPixEventRuntime/${VERSION}" + FILENAME "winpixevent.${VERSION}.zip" + SHA512 1ae497fe84760d42176ba0f0c6e6e975f7c1ba3be1799fb1416810ea37244f5506098f7454a9831855ae76a2becff48aed9c3dca8934048124c88bd86eeb149f +) + +vcpkg_extract_source_archive( + PACKAGE_PATH + ARCHIVE ${ARCHIVE} + NO_REMOVE_ONE_LEVEL +) + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(PIX_ARCH ARM64) +else() + set(PIX_ARCH x64) +endif() + +file(GLOB HEADER_FILES "${PACKAGE_PATH}/include/WinPixEventRuntime/*.h") +file(INSTALL ${HEADER_FILES} DESTINATION "${CURRENT_PACKAGES_DIR}/include") + +if(VCPKG_TARGET_IS_UWP) + set(WINPIXEVENTRUNTIME WinPixEventRuntime_UAP) +else() + set(WINPIXEVENTRUNTIME WinPixEventRuntime) +endif() + +file(INSTALL "${PACKAGE_PATH}/bin/${PIX_ARCH}/${WINPIXEVENTRUNTIME}.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib") +file(INSTALL "${PACKAGE_PATH}/bin/${PIX_ARCH}/${WINPIXEVENTRUNTIME}.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib") + +file(INSTALL "${PACKAGE_PATH}/bin/${PIX_ARCH}/${WINPIXEVENTRUNTIME}.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/bin") +file(INSTALL "${PACKAGE_PATH}/bin/${PIX_ARCH}/${WINPIXEVENTRUNTIME}.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin") + +configure_file("${CMAKE_CURRENT_LIST_DIR}/winpixevent-config.cmake.in" + "${CURRENT_PACKAGES_DIR}/share/${PORT}/${PORT}-config.cmake" + @ONLY) + +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +vcpkg_install_copyright(FILE_LIST "${PACKAGE_PATH}/license.txt") diff --git a/vcpkg/ports/winpixevent/usage b/vcpkg/ports/winpixevent/usage new file mode 100644 index 0000000..e5ac7df --- /dev/null +++ b/vcpkg/ports/winpixevent/usage @@ -0,0 +1,4 @@ +The WinPixEventRuntime redistributable package provides CMake targets:
+
+ find_package(winpixevent CONFIG REQUIRED)
+ target_link_libraries(main PRIVATE Microsoft::WinPixEventRuntime)
diff --git a/vcpkg/ports/winpixevent/vcpkg.json b/vcpkg/ports/winpixevent/vcpkg.json new file mode 100644 index 0000000..6bda2bf --- /dev/null +++ b/vcpkg/ports/winpixevent/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "winpixevent", + "version": "1.0.240308001", + "description": "Allows applications to be instrumented with marker events, for use with Microsoft PIX.", + "homepage": "https://devblogs.microsoft.com/pix/", + "documentation": "https://devblogs.microsoft.com/pix/documentation/", + "license": "MIT", + "supports": "windows & (x64 | arm64) & !staticcrt & !xbox" +} diff --git a/vcpkg/ports/winpixevent/winpixevent-config.cmake.in b/vcpkg/ports/winpixevent/winpixevent-config.cmake.in new file mode 100644 index 0000000..5e34f2d --- /dev/null +++ b/vcpkg/ports/winpixevent/winpixevent-config.cmake.in @@ -0,0 +1,11 @@ +get_filename_component(_wpix_root "${CMAKE_CURRENT_LIST_DIR}" PATH)
+get_filename_component(_wpix_root "${_wpix_root}" PATH)
+
+add_library(Microsoft::WinPixEventRuntime SHARED IMPORTED)
+set_target_properties(Microsoft::WinPixEventRuntime PROPERTIES
+ IMPORTED_LOCATION "${_wpix_root}/bin/@WINPIXEVENTRUNTIME@.dll"
+ IMPORTED_IMPLIB "${_wpix_root}/lib/@WINPIXEVENTRUNTIME@.lib"
+ INTERFACE_INCLUDE_DIRECTORIES "${_wpix_root}/include"
+ IMPORTED_LINK_INTERFACE_LANGUAGES "C")
+
+unset(_wpix_root)
|