Mercurial > minori
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 192:50108040d792 | 193:0ad2507c3e60 |
|---|---|
| 26 | 26 |
| 27 include(CheckIncludeFile) | 27 include(CheckIncludeFile) |
| 28 check_include_file("CoreFoundation/CoreFoundation.h" HAVE_COREFOUNDATION) | 28 check_include_file("CoreFoundation/CoreFoundation.h" HAVE_COREFOUNDATION) |
| 29 # If you're building on OS X, you most likely do have this file, but we | 29 # If you're building on OS X, you most likely do have this file, but we |
| 30 # check anyway. | 30 # check anyway. |
| 31 if (HAVE_COREFOUNDATION) | 31 if(HAVE_COREFOUNDATION) |
| 32 list(APPEND DEFINES HAVE_COREFOUNDATION) | 32 list(APPEND DEFINES HAVE_COREFOUNDATION) |
| 33 find_library(OBJC_LIBRARY objc) | |
| 34 | |
| 35 if(NOT OBJC_LIBRARY) | |
| 36 message(STATUS "Found CoreFoundation/CoreFoundation.h, but not the Objective-C runtime. How?") | |
| 37 endif() | |
| 38 | |
| 33 list(APPEND SRC_FILES src/win/quartz.cc) | 39 list(APPEND SRC_FILES src/win/quartz.cc) |
| 34 | 40 |
| 35 find_library(FOUNDATION_LIBRARY Foundation) | 41 find_library(FOUNDATION_LIBRARY Foundation) |
| 36 find_library(COREGRAPHICS_LIBRARY CoreGraphics) | 42 find_library(COREGRAPHICS_LIBRARY CoreGraphics) |
| 37 find_library(APPKIT_LIBRARY AppKit) | 43 find_library(APPKIT_LIBRARY AppKit) |
| 38 list(APPEND LIBRARIES ${FOUNDATION_LIBRARY} ${COREGRAPHICS_LIBRARY} ${APPKIT_LIBRARY}) | 44 list(APPEND LIBRARIES ${FOUNDATION_LIBRARY} ${COREGRAPHICS_LIBRARY} ${APPKIT_LIBRARY} ${OBJC_LIBRARY}) |
| 39 else() | 45 else() # NOT HAVE_COREFOUNDATION |
| 40 message(STATUS "You don't have Core Foundation. How? What kind of voodoo magic did you do to cause this?") | 46 message(STATUS "You don't have Core Foundation. How? What kind of voodoo magic did you do to cause this?") |
| 41 message(WARNING "LaunchServices support will not be compiled.") | 47 message(WARNING "LaunchServices support will not be compiled.") |
| 42 endif() | 48 endif() # HAVE_COREFOUNDATION |
| 43 elseif(WIN32) | 49 elseif(WIN32) |
| 44 list(APPEND DEFINES WIN32) | 50 list(APPEND DEFINES WIN32) |
| 45 list(APPEND SRC_FILES | 51 list(APPEND SRC_FILES |
| 46 # win32 | 52 # win32 |
| 47 src/fd/win32.cc | 53 src/fd/win32.cc |
