Permitting non-Apple builds by not requiring IOKit #296
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Linux builds fail because the AppleSensors addon is requiring that IOKit is present:
{code}
% ./build.sh
-- Configuration set to: DebugFast
CMake Error at addons/AppleSensors/CMakeLists.txt:28 (message):
IOKit not found
-- Configuring incomplete, errors occurred!
See also "/home/presto/software/io/build/CMakeFiles/CMakeOutput.log".
See also "/home/presto/software/io/build/CMakeFiles/CMakeError.log".
-- Configuration set to: DebugFast
CMake Error at addons/AppleSensors/CMakeLists.txt:28 (message):
IOKit not found
-- Configuring incomplete, errors occurred!
See also "/home/presto/software/io/build/CMakeFiles/CMakeOutput.log".
See also "/home/presto/software/io/build/CMakeFiles/CMakeError.log".
make: *** [cmake_check_build_system] Error 1
{code}
It appears that just making the definition of that module conditional on the presence of IOKit would allow builds to succeed on non-Apple operating systems. If any other variations are desired (somehow checking the OS directly, and then requiring IOKit if on MacOS?), that could be a good modification.