commit a709bab1c0b7cfaa500da4708bde9d8cad6f38c1
parent de909e5a5240ddc9f512872ce58664eb3bf704d2
Author: cfillion <cfillion@users.noreply.github.com>
Date: Fri, 22 Nov 2019 07:38:23 -0500
fix building with latest SWELL on non-Metal macOS versions
Diffstat:
1 file changed, 8 insertions(+), 0 deletions(-)
diff --git a/cmake/FindSWELL.cmake b/cmake/FindSWELL.cmake
@@ -34,7 +34,15 @@ if(APPLE)
find_library(COCOA Cocoa)
find_library(CARBON Carbon)
+ find_library(METAL Metal)
+ mark_as_advanced(COCOA CARBON METAL)
target_link_libraries(swell PUBLIC ${COCOA} ${CARBON})
+
+ if(METAL)
+ target_link_libraries(swell PUBLIC ${METAL})
+ else()
+ target_compile_definitions(swell PRIVATE SWELL_NO_METAL)
+ endif()
else()
add_library(swell ${SWELL_DIR}/swell-modstub-generic.cpp)