Skip to content

Bad Make File causing errors on recent Mac Xcode (With Fix) #20

Description

@cortis

I tried building nori on my Mac in 2020 and got errors like the following:
/Users/cortis/Save The Machine/Experiments/nori/ext/nanogui/ext/glfw/src/cocoa_init.m:282:1: error: expected identifier or '('
@interface GLFWLayoutListener : NSObject
^
/Users/cortis/Save The Machine/Experiments/nori/ext/nanogui/ext/glfw/src/cocoa_init.m:292:1: error: expected identifier or '('
@EnD
^
....

The problem can be fixed by deleting (or commenting out) lines 75-79 of
nori/ext/nanogui/ext/glfw/src/CMakeLists.txt

Specifically you need to remove these lines for modern macs (Tested with macOS Catalina 10.15.4 and Xcode 11.6):
if (APPLE)
# For some reason, CMake doesn't know about .m
set_source_files_properties(${glfw_SOURCES} PROPERTIES LANGUAGE C)
endif()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions