Skip to content

Commit

Permalink
Backport fix for linking error on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
darksylinc committed Dec 13, 2021
1 parent 50d9e1f commit 6c231c1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions OgreMain/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,14 @@ else()
set_target_properties(OgreMain PROPERTIES VERSION ${OGRE_SOVERSION} SOVERSION ${OGRE_SOVERSION})
endif()

if(OGRE_GCC_VERSION VERSION_EQUAL 4.8 OR OGRE_GCC_VERSION VERSION_GREATER 4.8)
list(APPEND LIBRARIES "-latomic")
if (NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
if(OGRE_GCC_VERSION VERSION_EQUAL 4.8 OR OGRE_GCC_VERSION VERSION_GREATER 4.8)
if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
list(APPEND LIBRARIES "-latomic_ops")
else()
list(APPEND LIBRARIES "-latomic")
endif()
endif()
endif()

if (APPLE)
Expand Down

0 comments on commit 6c231c1

Please sign in to comment.