1
0
Fork 0
mirror of https://github.com/anrieff/libcpuid synced 2025-10-03 11:01:30 +00:00

allow to build either static or shared (#156)

also fix shared if msvc

Co-authored-by: Veselin Georgiev <anrieff@gmail.com>
This commit is contained in:
SpaceIm 2021-07-16 00:49:00 +02:00 committed by GitHub
commit ae7b063c8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 5 deletions

View file

@ -7,6 +7,13 @@ project(
LANGUAGES C CXX ASM_MASM
VERSION ${VERSION})
if(MSVC)
set(LIBCPUID_SHARED OFF)
else()
set(LIBCPUID_SHARED ON)
endif()
option(BUILD_SHARED_LIBS "Build shared lib" ${LIBCPUID_SHARED})
option(LIBCPUID_TESTS "Enable building tests" OFF)
set(CMAKE_CXX_STANDARD 11)