diff --git a/src/OpenColorIO/CMakeLists.txt b/src/OpenColorIO/CMakeLists.txt index 48061251b4..cce741db6d 100755 --- a/src/OpenColorIO/CMakeLists.txt +++ b/src/OpenColorIO/CMakeLists.txt @@ -270,6 +270,14 @@ set_target_properties(OpenColorIO PROPERTIES SOVERSION ${SOVERSION} ) +if (UNIX AND NOT APPLE) + # Also hide all the symbols of dependent libraries to prevent clashes if + # an app using this project is linked against other versions of our + # dependencies. + set_property (TARGET OpenColorIO + APPEND PROPERTY LINK_FLAGS "-Wl,--exclude-libs,ALL") +endif () + if(MSVC AND BUILD_SHARED_LIBS) # Install the pdb file if any. install(FILES $ DESTINATION bin OPTIONAL)