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()
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()