vendor/libgit2/cmake/FindCoreFoundation.cmake in rugged-1.3.2.3 vs vendor/libgit2/cmake/FindCoreFoundation.cmake in rugged-1.4.2

- old
+ new

@@ -4,23 +4,23 @@ # 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(STATUS "Found CoreFoundation ${COREFOUNDATION_LIBRARIES}") - ENDIF() - SET(COREFOUNDATION_FOUND TRUE) - SET(COREFOUNDATION_LDFLAGS "-framework CoreFoundation") -ENDIF () +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(STATUS "Found CoreFoundation ${COREFOUNDATION_LIBRARIES}") + endif() + set(COREFOUNDATION_FOUND TRUE) + set(COREFOUNDATION_LDFLAGS "-framework CoreFoundation") +endif() -IF (CoreFoundation_FIND_REQUIRED AND NOT COREFOUNDATION_FOUND) - MESSAGE(FATAL_ERROR "CoreFoundation not found") -ENDIF() +if(CoreFoundation_FIND_REQUIRED AND NOT COREFOUNDATION_FOUND) + message(FATAL_ERROR "CoreFoundation not found") +endif() -MARK_AS_ADVANCED( +mark_as_advanced( COREFOUNDATION_INCLUDE_DIR COREFOUNDATION_LIBRARIES )