Skip to content

Commit

Permalink
Configure cross-compilation for Apple Silicon
Browse files Browse the repository at this point in the history
  • Loading branch information
SiarheiFedartsou committed Sep 15, 2022
1 parent 5097abd commit f4255f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@ project(OSRM C CXX)
message(STATUS "XXX2 ${CMAKE_BUILD_RPATH} ${CMAKE_SHARED_LINKER_FLAGS}")

if (APPLE)
set(CMAKE_INSTALL_RPATH "@loader_path")
set(CMAKE_BUILD_RPATH "@loader_path")
else()
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
# if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
#set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
set(CMAKE_BUILD_RPATH "\$ORIGIN")
# https://stackoverflow.com/questions/6324131/rpath-origin-not-having-desired-effect
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,origin")
endif()
#endif()
endif()
message(STATUS "XXX2 ${CMAKE_INSTALL_RPATH} ${CMAKE_SHARED_LINKER_FLAGS}")

Expand Down

0 comments on commit f4255f4

Please sign in to comment.