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.
This commit is contained in:
Klemens Nanni 2023-03-02 16:18:24 +04:00 committed by fiaxh
parent 32e535a79c
commit b75b6062ab

View file

@ -231,6 +231,7 @@ add_executable(dino ${MAIN_VALA_C} ${MAIN_GRESOURCES_TARGET})
add_dependencies(dino ${GETTEXT_PACKAGE}-translations) add_dependencies(dino ${GETTEXT_PACKAGE}-translations)
target_include_directories(dino PRIVATE src) target_include_directories(dino PRIVATE src)
target_link_libraries(dino libdino ${MAIN_PACKAGES}) target_link_libraries(dino libdino ${MAIN_PACKAGES})
set_target_properties(dino PROPERTIES ENABLE_EXPORTS TRUE)
if(WIN32) if(WIN32)
target_link_libraries(dino -mwindows) target_link_libraries(dino -mwindows)