lfreist / hwinfo

cross platform C++ library for hardware information (CPU, RAM, GPU, ...)
MIT License
433 stars 74 forks source link

feat: make hwinfo features modular #98

Closed aminya closed 1 month ago

aminya commented 1 month ago

Fixes #94 Related to #54

Implements https://github.com/lfreist/hwinfo/issues/94#issuecomment-2215053551

All components are available via the hwinfo::hwinfo target, or via individual CMake targets, which you can choose and link against depending on your needs.

target_link_libraries(your_target PRIVATE hwinfo::hwinfo)

or

target_link_libraries(
  your_target
  PRIVATE hwinfo::cpu
          hwinfo::gpu
          hwinfo::ram
          hwinfo::mainboard
          hwinfo::disk
          hwinfo::os
          hwinfo::battery)

The CMake options control which components will be built and available in the library: