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:
commit
f2ab8b7ef2
2 changed files with 15 additions and 9 deletions
|
@ -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)
|
||||
|
|
|
@ -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}>)
|
||||
|
||||
|
|
Loading…
Reference in a new issue