diff options
Diffstat (limited to 'vcpkg/ports/cpuid')
| -rw-r--r-- | vcpkg/ports/cpuid/fix-LNK2019.patch | 13 | ||||
| -rw-r--r-- | vcpkg/ports/cpuid/fix-build.patch | 12 | ||||
| -rw-r--r-- | vcpkg/ports/cpuid/portfile.cmake | 27 | ||||
| -rw-r--r-- | vcpkg/ports/cpuid/vcpkg.json | 18 |
4 files changed, 70 insertions, 0 deletions
diff --git a/vcpkg/ports/cpuid/fix-LNK2019.patch b/vcpkg/ports/cpuid/fix-LNK2019.patch new file mode 100644 index 0000000..0c8bdde --- /dev/null +++ b/vcpkg/ports/cpuid/fix-LNK2019.patch @@ -0,0 +1,13 @@ +diff --git a/libcpuid/CMakeLists.txt b/libcpuid/CMakeLists.txt
+index 09189ef..fa3f6ff 100644
+--- a/libcpuid/CMakeLists.txt
++++ b/libcpuid/CMakeLists.txt
+@@ -21,7 +21,7 @@ if(UNIX)
+ add_compile_definitions(_GNU_SOURCE)
+ endif(UNIX)
+
+-if("${MSVC_CXX_ARCHITECTURE_ID}" MATCHES "x64")
++if(MSVC AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64|x64")
+ list(APPEND cpuid_sources masm-x64.asm)
+ endif()
+
diff --git a/vcpkg/ports/cpuid/fix-build.patch b/vcpkg/ports/cpuid/fix-build.patch new file mode 100644 index 0000000..5b56a97 --- /dev/null +++ b/vcpkg/ports/cpuid/fix-build.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4f5ff50..3d62dba 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -61,7 +61,6 @@ endif(UNIX) + + # Include subdirectories + add_subdirectory(libcpuid) +-add_subdirectory(cpuid_tool) + if(LIBCPUID_BUILD_DRIVERS) + add_subdirectory(drivers) + endif(LIBCPUID_BUILD_DRIVERS) diff --git a/vcpkg/ports/cpuid/portfile.cmake b/vcpkg/ports/cpuid/portfile.cmake new file mode 100644 index 0000000..0b2116e --- /dev/null +++ b/vcpkg/ports/cpuid/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO anrieff/libcpuid + REF "v${VERSION}" + SHA512 6b642418bef40848fa0b61a6798c90121e1d31dceee815946bde621e01f50a8353d4cd22bce864af080e4342e036bab9bfe1f61f99083620885f9e252ce11895 + HEAD_REF master + PATCHES + fix-build.patch + fix-LNK2019.patch +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DLIBCPUID_ENABLE_DOCS=OFF +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/cpuid) +vcpkg_fixup_pkgconfig() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING") diff --git a/vcpkg/ports/cpuid/vcpkg.json b/vcpkg/ports/cpuid/vcpkg.json new file mode 100644 index 0000000..4bc4a3e --- /dev/null +++ b/vcpkg/ports/cpuid/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "cpuid", + "version": "0.8.1", + "description": "Provides CPU identification for the x86 (and x86_64)", + "homepage": "https://github.com/anrieff/libcpuid", + "license": "MIT", + "supports": "!uwp & !(windows & arm)", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} |