mirror of
https://github.com/anrieff/libcpuid
synced 2025-01-23 20:06:41 +00:00
Fix CMake
This commit is contained in:
parent
9eacb1a36e
commit
f729a74b41
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 @@
|
|||
add_library(cpuid
|
||||
cpuid_main.c
|
||||
set(cpuid_sources cpuid_main.c
|
||||
recog_intel.c
|
||||
recog_amd.c
|
||||
rdtsc.c
|
||||
asm-bits.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_sources}
|
||||
)
|
||||
target_include_directories(cpuid SYSTEM PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
|
||||
|
||||
|
|
Loading…
Reference in a new issue