From 7cfded894f91b82fa2ecf7e13c3a871b1c4b641b Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Thu, 18 Nov 2021 13:05:50 +0100 Subject: src/{CMakeLists.txt,indicator.symbols}: Don't export private symbols. Immitate symbol exports as previously done with libtool. Fixes https://github.com/AyatanaIndicators/libayatana-indicator/issues/59 --- src/CMakeLists.txt | 1 + src/indicator.symbols | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 src/indicator.symbols (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9d3fb22..9236617 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -140,6 +140,7 @@ target_compile_definitions("${ayatana_indicator_gtkver}" PUBLIC DG_LOG_DOMAIN="l target_include_directories("${ayatana_indicator_gtkver}" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) target_include_directories("${ayatana_indicator_gtkver}" PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_include_directories("${ayatana_indicator_gtkver}" PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) +target_link_options("${ayatana_indicator_gtkver}" PRIVATE "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/indicator.symbols") target_link_libraries("${ayatana_indicator_gtkver}" ${PROJECT_DEPS_LIBRARIES} ${EXTRA_LIBS}) add_dependencies("${ayatana_indicator_gtkver}" "src-generated") install(FILES "${CMAKE_CURRENT_BINARY_DIR}/lib${ayatana_indicator_gtkver}.so" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}") diff --git a/src/indicator.symbols b/src/indicator.symbols new file mode 100644 index 0000000..1cb68cd --- /dev/null +++ b/src/indicator.symbols @@ -0,0 +1,6 @@ +{ + global: indicator_*; + INDICATOR_*; + ICON_SIZE*; + local: _indicator_*; +}; -- cgit v1.2.3