From 5938ba528fea407d82b53500c230d4daa923522e Mon Sep 17 00:00:00 2001 From: Alexei Kotov Date: Thu, 19 Jun 2025 13:50:15 +0300 Subject: [PATCH] Export symbols for openmw binary under Clang (#8039) --- apps/openmw/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/openmw/CMakeLists.txt b/apps/openmw/CMakeLists.txt index 37de0abeab..2dc2d2e24d 100644 --- a/apps/openmw/CMakeLists.txt +++ b/apps/openmw/CMakeLists.txt @@ -138,6 +138,12 @@ if(BUILD_OPENMW) endif() target_link_libraries(openmw openmw-lib) + + # Workaround necessary to ensure osgAnimation::MatrixLinearSampler dynamic casts work under Clang + # NOTE: it's unclear whether the broken behavior is spec-compliant + if (CMAKE_CXX_COMPILER_ID STREQUAL Clang) + set_target_properties(openmw PROPERTIES ENABLE_EXPORTS ON) + endif() endif() # Sound stuff - here so CMake doesn't stupidly recompile EVERYTHING