Skip to content

Commit

Permalink
fix embree link error on mac arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
mchenwang committed Feb 28, 2023
1 parent c06b4c6 commit 9e86cb4
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,17 @@ add_custom_command(TARGET Moer POST_BUILD
${EMBREE_DLL} $<TARGET_FILE_DIR:Moer>)

target_link_libraries(Moer PUBLIC embree3)
target_link_libraries(Moer PUBLIC tinyobjloader)
target_link_libraries(Moer PUBLIC tinyobjloader)

if(APPLE)
execute_process(
COMMAND uname -m
RESULT_VARIABLE result
OUTPUT_VARIABLE MOER_OSX_NATIVE_ARCHITECTURE
OUTPUT_STRIP_TRAILING_WHITESPACE
)

if(${MOER_OSX_NATIVE_ARCHITECTURE} STREQUAL "arm64")
set_target_properties(Moer PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
endif()
endif()

0 comments on commit 9e86cb4

Please sign in to comment.