From b75b6062abc07b25d0dcd6717e168aa85be7cf4e Mon Sep 17 00:00:00 2001 From: Klemens Nanni Date: Thu, 2 Mar 2023 16:18:24 +0400 Subject: [PATCH] Always export symbols to fix startup on BSDs ``` $ dino (dino:38515): Gtk-ERROR **: 15:38:38.538: failed to add UI from resource /im/dino/Dino/unified_main_content.ui: .:26:1 Invalid object type 'DinoUiConversationSelector' Trace/BPT trap (core dumped) ``` This works on Linux because CMake itself links with `-rdynamic` by default as per its `Modules/Platform/Linux-*.cmake`. OpenBSD carries this as local patch, FreeBSD links with `--export-dynamics`. Just linking with `-rdynamic` also fixes it on OpenBSD, as expected. https://cmake.org/cmake/help/latest/prop_tgt/ENABLE_EXPORTS.html Fix #438. --- main/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index 9ca7ce815..1a66597ce 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -231,6 +231,7 @@ add_executable(dino ${MAIN_VALA_C} ${MAIN_GRESOURCES_TARGET}) add_dependencies(dino ${GETTEXT_PACKAGE}-translations) target_include_directories(dino PRIVATE src) target_link_libraries(dino libdino ${MAIN_PACKAGES}) +set_target_properties(dino PROPERTIES ENABLE_EXPORTS TRUE) if(WIN32) target_link_libraries(dino -mwindows)