FindCoreFoundation.cmake 725 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
# Find CoreFoundation.framework
# This will define :
#
# COREFOUNDATION_FOUND
# COREFOUNDATION_LIBRARIES
# COREFOUNDATION_LDFLAGS
#

FIND_PATH(COREFOUNDATION_INCLUDE_DIR NAMES CoreFoundation.h)
FIND_LIBRARY(COREFOUNDATION_LIBRARIES NAMES CoreFoundation)
IF (COREFOUNDATION_INCLUDE_DIR AND COREFOUNDATION_LIBRARIES)
	IF (NOT CoreFoundation_FIND_QUIETLY)
13
		MESSAGE(STATUS "Found CoreFoundation ${COREFOUNDATION_LIBRARIES}")
14
	ENDIF()
15
	SET(COREFOUNDATION_FOUND TRUE)
16
	SET(COREFOUNDATION_LDFLAGS "-framework CoreFoundation")
17
ENDIF ()
18 19

IF (CoreFoundation_FIND_REQUIRED AND NOT COREFOUNDATION_FOUND)
20
	MESSAGE(FATAL_ERROR "CoreFoundation not found")
21 22 23 24 25 26
ENDIF()

MARK_AS_ADVANCED(
	COREFOUNDATION_INCLUDE_DIR
	COREFOUNDATION_LIBRARIES
)