Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: make hwinfo features modular #98

Merged
merged 7 commits into from
Jul 24, 2024
Merged

feat: make hwinfo features modular #98

merged 7 commits into from
Jul 24, 2024

Conversation

aminya
Copy link
Contributor

@aminya aminya commented Jul 15, 2024

Fixes #94
Related to #54

Implements #94 (comment)

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:

  • HWINFO_OS "Enable OS detection" (default to ON)
  • HWINFO_MAINBOARD "Enable mainboard detection" (default to ON)
  • HWINFO_CPU "Enable CPU detection" (default to ON)
  • HWINFO_DISK "Enable disk detection" (default to ON)
  • HWINFO_RAM "Enable RAM detection" (default to ON)
  • HWINFO_GPU "Enable GPU detection" (default to ON)
  • HWINFO_GPU_OPENCL "Enable usage of OpenCL in GPU information" (default to OFF)
  • HWINFO_BATTERY "Enable battery detection" (default to ON)

@aminya aminya force-pushed the modular branch 4 times, most recently from f5f884e to 1055e1d Compare July 15, 2024 08:50
@lfreist lfreist merged commit ef8fce2 into lfreist:main Jul 24, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make HWinfo modular
2 participants