From bf32fe9882d7dd1dd6fbb88f39a42371063b6cd6 Mon Sep 17 00:00:00 2001 From: "Tim E. Real" Date: Mon, 1 Nov 2010 08:36:22 +0000 Subject: All MESS plugins: compile with -fvisibility=hidden, fixes LADSPA plugins not appearing in list. Added simpledrums2 (from muse_qt4_evolution). --- muse2/synti/s1/CMakeLists.txt | 5 ++++- muse2/synti/s1/s1.cpp | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'muse2/synti/s1') diff --git a/muse2/synti/s1/CMakeLists.txt b/muse2/synti/s1/CMakeLists.txt index 890c6b12..7dffe905 100644 --- a/muse2/synti/s1/CMakeLists.txt +++ b/muse2/synti/s1/CMakeLists.txt @@ -25,7 +25,10 @@ add_library ( s1 SHARED s1.cpp ) # tell cmake to name target s1.so instead of # libs1.so # -set_target_properties ( s1 PROPERTIES PREFIX "" ) +set_target_properties ( s1 + PROPERTIES PREFIX "" + COMPILE_FLAGS "-fvisibility=hidden" + ) target_link_libraries(s1 synti diff --git a/muse2/synti/s1/s1.cpp b/muse2/synti/s1/s1.cpp index c73615bd..8520a742 100644 --- a/muse2/synti/s1/s1.cpp +++ b/muse2/synti/s1/s1.cpp @@ -221,7 +221,12 @@ extern "C" { MESS_MAJOR_VERSION, MESS_MINOR_VERSION, instantiate }; - + // We must compile with -fvisibility=hidden to avoid namespace + // conflicts with global variables. + // Only visible symbol is "mess_descriptor". + // (TODO: all plugins should be compiled this way) + + __attribute__ ((visibility("default"))) const MESS* mess_descriptor() { return &descriptor; } } -- cgit v1.2.3