1
0
Fork 0
mirror of https://github.com/anrieff/libcpuid synced 2024-12-16 16:35:45 +00:00

Merge pull request #139 from kreuzerkrieg/Fix_Win_x64_Build

Fix Win64 build
This commit is contained in:
Veselin Georgiev 2020-02-12 00:11:27 +02:00 committed by GitHub
commit f2ab8b7ef2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 9 deletions

View file

@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.14)
set(VERSION "0.4.1")
project(cpuid LANGUAGES C CXX ASM VERSION ${VERSION})
project(cpuid LANGUAGES C CXX ASM_MASM VERSION ${VERSION})
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_C_STANDARD 99)

View file

@ -1,12 +1,18 @@
set(cpuid_sources cpuid_main.c
recog_intel.c
recog_amd.c
rdtsc.c
libcpuid_util.c
rdmsr.c
msrdriver.c
asm-bits.c)
if ("${MSVC_CXX_ARCHITECTURE_ID}" MATCHES "x64")
list(APPEND cpuid_sources masm-x64.asm)
endif ()
add_library(cpuid
cpuid_main.c
recog_intel.c
recog_amd.c
rdtsc.c
asm-bits.c
libcpuid_util.c
rdmsr.c
msrdriver.c
${cpuid_sources}
)
target_include_directories(cpuid SYSTEM PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)