mirror of
https://github.com/glfw/glfw.git
synced 2026-02-20 22:23:12 +01:00
Cocoa: Fix ObjC being built as C with CMake 3.19
CMake 3.19 adds -xc when the LANGUAGE file property is C, breaking our
workaround for CMake 3.15 and earlier not understanding the .m suffix.
Fixes #1787.
(cherry picked from commit 3327050ca6)
This commit is contained in:
committed by
Camilla Löwy
parent
395ab660d5
commit
baf26a6ea7
@@ -72,8 +72,8 @@ if (_GLFW_X11 OR _GLFW_WAYLAND)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (APPLE)
|
||||
# For some reason CMake didn't know about .m until version 3.16
|
||||
# Workaround for CMake not knowing about .m files before version 3.16
|
||||
if ("${CMAKE_VERSION}" VERSION_LESS "3.16" AND APPLE)
|
||||
set_source_files_properties(cocoa_init.m cocoa_joystick.m cocoa_monitor.m
|
||||
cocoa_window.m nsgl_context.m PROPERTIES
|
||||
LANGUAGE C)
|
||||
|
||||
Reference in New Issue
Block a user