Skip to content

Commit

Permalink
Add macOS library IOKit
Browse files Browse the repository at this point in the history
  • Loading branch information
Gin committed Sep 22, 2023
1 parent c877295 commit 11bbda3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions SerialPrograms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2017,6 +2017,14 @@ else()
# when compiling OpenCV
target_compile_options(SerialPrograms PRIVATE -Wall -Wextra -Wpedantic -Werror -Wno-c11-extensions)

# Set OS-specific flags
if (WIN32)
elseif (APPLE)
# on macOS, need this framework to query OS API to control display sleep and system sleep behavior
target_link_libraries(SerialPrograms "-framework IOKit")
elseif(UNIX)
endif()

IF(${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm")
# Arm CPU

Expand Down

0 comments on commit 11bbda3

Please sign in to comment.