mirror of
https://github.com/anrieff/libcpuid
synced 2025-10-03 11:01:30 +00:00
Fix build for NetBSD (and presumably DragonFly BSD)
These both use POSIX threads. I got a link error when cross-compiling using Nixpkgs (Linux -> NetBSD) that went away once I passed `-pthread`. The autoconf is crafted to have the same conditional as the C code itself.
This commit is contained in:
parent
f1c96e1372
commit
09071d20f3
3 changed files with 40 additions and 0 deletions
|
@ -23,6 +23,7 @@ add_library(cpuid ${cpuid_sources})
|
|||
set_property(TARGET cpuid PROPERTY WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||
target_include_directories(cpuid SYSTEM PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
|
||||
|
||||
target_link_libraries(cpuid ${CMAKE_THREAD_LIBS_INIT})
|
||||
target_compile_definitions(cpuid PRIVATE VERSION="${PROJECT_VERSION}")
|
||||
set_target_properties(cpuid PROPERTIES VERSION "${LIBCPUID_CURRENT}.${LIBCPUID_AGE}.${LIBCPUID_REVISION}")
|
||||
set_target_properties(cpuid PROPERTIES SOVERSION "${LIBCPUID_CURRENT}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue