FindCoreFoundation.cmake 718 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
# 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)
		MESSAGE("-- Found CoreFoundation ${COREFOUNDATION_LIBRARIES}")
	ENDIF()
15
	SET(COREFOUNDATION_FOUND TRUE)
16
	SET(COREFOUNDATION_LDFLAGS "-framework CoreFoundation")
17
ENDIF ()
18 19 20 21 22 23 24 25 26

IF (CoreFoundation_FIND_REQUIRED AND NOT COREFOUNDATION_FOUND)
	MESSAGE(FATAL "-- CoreFoundation not found")
ENDIF()

MARK_AS_ADVANCED(
	COREFOUNDATION_INCLUDE_DIR
	COREFOUNDATION_LIBRARIES
)