1
0
Fork 0
mirror of https://github.com/anrieff/libcpuid synced 2025-01-23 20:06:41 +00:00

Fix CMake

This commit is contained in:
kreuzerkrieg 2020-02-11 12:29:31 +02:00
parent 9eacb1a36e
commit f729a74b41
2 changed files with 15 additions and 9 deletions

View file

@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.14) cmake_minimum_required(VERSION 3.14)
set(VERSION "0.4.1") 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_CXX_STANDARD 11)
set(CMAKE_C_STANDARD 99) 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 add_library(cpuid
cpuid_main.c ${cpuid_sources}
recog_intel.c
recog_amd.c
rdtsc.c
asm-bits.c
libcpuid_util.c
rdmsr.c
msrdriver.c
) )
target_include_directories(cpuid SYSTEM PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>) target_include_directories(cpuid SYSTEM PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)