Mercurial > minori
diff dep/animia/CMakeLists.txt @ 193:0ad2507c3e60
dep/animia: cmake: check for the objc runtime library
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Thu, 07 Dec 2023 01:56:39 -0500 |
parents | 0fc126d52de4 |
children | 9f3534f6b8c4 |
line wrap: on
line diff
--- 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