summaryrefslogtreecommitdiff
path: root/media-gfx/alembic/files/alembic-fix-importerror.patch
blob: 8a86f08c73349c2b9c446222bddbdc4892b1f929 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/python/PyAlembic/CMakeLists.txt b/python/PyAlembic/CMakeLists.txt
index 254ca2b..c8c915a 100644
--- a/python/PyAlembic/CMakeLists.txt
+++ b/python/PyAlembic/CMakeLists.txt
@@ -45,6 +45,12 @@ IF (Boost_PYTHON_LIBRARY AND ALEMBIC_PYTHON_LIBRARY)
         ADD_DEFINITIONS(-Wno-unused-local-typedefs)
     ENDIF()
 
+	# fix for ImportError: dynamic module does not define init function (initalembic)
+	# see: https://github.com/alembic/alembic/issues/142
+	IF (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+		SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=default")
+	ENDIF()
+
     SET(CPP_FILES
         PyAbcCoreLayer.cpp
         PyAbcGeomTypes.cpp