File: FindIOKit.cmake

package info (click to toggle)
cantata 3.4.0.ds1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 20,428 kB
  • sloc: cpp: 109,584; perl: 1,366; xml: 722; python: 139; lex: 110; sh: 105; yacc: 78; makefile: 8
file content (24 lines) | stat: -rw-r--r-- 774 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# - Find IOKit on Mac
#
#  IOKit_LIBRARY - the library to use IOKit
#  IOKit_FOUND - true if IOKit has been found

# Copyright (c) 2009, Harald Fernengel <harry@kdevelop.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
include(FindPackageHandleStandardArgs)

find_package(CoreFoundation REQUIRED)
find_library(IOKit_LIBRARY IOKit)

find_package_handle_standard_args(IOKit DEFAULT_MSG IOKit_LIBRARY)

if(IOKit_FOUND)
	set(IOKit_LIBRARIES ${IOKit_LIBRARY})
	add_library(IOKit::IOKit UNKNOWN IMPORTED)
	set_target_properties(IOKit::IOKit PROPERTIES
		IMPORTED_LOCATION "${IOKit_LIBRARY}"
	)
	target_link_libraries(IOKit::IOKit INTERFACE CoreFoundation::CoreFoundation)
endif()