# HG changeset patch # User Paper # Date 1701932199 18000 # Node ID 0ad2507c3e602d2ff5c0f9d65586227278852574 # Parent 50108040d792213f8dbbf240cc2687569a092db7 dep/animia: cmake: check for the objc runtime library diff -r 50108040d792 -r 0ad2507c3e60 dep/animia/CMakeLists.txt --- a/dep/animia/CMakeLists.txt Thu Dec 07 01:50:29 2023 -0500 +++ b/dep/animia/CMakeLists.txt Thu Dec 07 01:56:39 2023 -0500 @@ -28,18 +28,24 @@ check_include_file("CoreFoundation/CoreFoundation.h" HAVE_COREFOUNDATION) # If you're building on OS X, you most likely do have this file, but we # check anyway. - if (HAVE_COREFOUNDATION) + if(HAVE_COREFOUNDATION) list(APPEND DEFINES HAVE_COREFOUNDATION) + find_library(OBJC_LIBRARY objc) + + if(NOT OBJC_LIBRARY) + message(STATUS "Found CoreFoundation/CoreFoundation.h, but not the Objective-C runtime. How?") + endif() + list(APPEND SRC_FILES src/win/quartz.cc) find_library(FOUNDATION_LIBRARY Foundation) find_library(COREGRAPHICS_LIBRARY CoreGraphics) find_library(APPKIT_LIBRARY AppKit) - list(APPEND LIBRARIES ${FOUNDATION_LIBRARY} ${COREGRAPHICS_LIBRARY} ${APPKIT_LIBRARY}) - else() + list(APPEND LIBRARIES ${FOUNDATION_LIBRARY} ${COREGRAPHICS_LIBRARY} ${APPKIT_LIBRARY} ${OBJC_LIBRARY}) + else() # NOT HAVE_COREFOUNDATION message(STATUS "You don't have Core Foundation. How? What kind of voodoo magic did you do to cause this?") message(WARNING "LaunchServices support will not be compiled.") - endif() + endif() # HAVE_COREFOUNDATION elseif(WIN32) list(APPEND DEFINES WIN32) list(APPEND SRC_FILES