# - Try to find the COREFOUNDATION library
# Once done this will define
#
#  COREFOUNDATION_FOUND - System has COREFOUNDATION
#  COREFOUNDATION_INCLUDE_DIR - The COREFOUNDATION include directory
#  COREFOUNDATION_LIBRARIES - The libraries needed to use COREFOUNDATION
#  COREFOUNDATION_DEFINITIONS - Compiler switches required for using COREFOUNDATION


# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
#FIND_PACKAGE(PkgConfig)
#PKG_SEARCH_MODULE(PC_COREFOUNDATION COREFOUNDATION)

SET(COREFOUNDATION_DEFINITIONS "")

FIND_PATH(COREFOUNDATION_INCLUDE_DIR NAMES CoreFoundation.framework
   HINTS
   ${PC_COREFOUNDATION_INCLUDEDIR}
   ${PC_COREFOUNDATION_INCLUDE_DIRS}
)

FIND_LIBRARY(COREFOUNDATION_LIBRARIES NAMES CoreFoundation)

INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CoreFoundation DEFAULT_MSG COREFOUNDATION_LIBRARIES COREFOUNDATION_INCLUDE_DIR)

MARK_AS_ADVANCED(COREFOUNDATION_INCLUDE_DIR COREFOUNDATION_LIBRARIES)
