orbitalquark / textadept

Textadept is a fast, minimalist, and remarkably extensible cross-platform text editor for programmers.
https://orbitalquark.github.io/textadept
MIT License
636 stars 38 forks source link

Add iconv library for FreeBSD #477

Open hellium6 opened 10 months ago

hellium6 commented 10 months ago

When building Textadept 12.1 release on FreeBSD 12.4-RELEASE i386 I got the following:

...
[ 98%] Linking CXX executable textadept-gtk
/usr/local/bin/ld: CMakeFiles/textadept-gtk.dir/src/textadept.c.o: undefined reference to symbol 'libiconv_open'
/usr/local/bin/ld: /usr/local/lib/libiconv.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
gmake[2]: *** [CMakeFiles/textadept-gtk.dir/build.make:107: textadept-gtk] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:315: CMakeFiles/textadept-gtk.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2

Adding iconv to set(ta_link_libs... line on root CMakeLists.txt makes it link without complaining:

...
[100%] Linking CXX executable textadept-gtk
[100%] Built target textadept-gtk

I think iconv should be added in CMakeLists.txt at least for FreeBSD.

orbitalquark commented 10 months ago

If Textadept ever supports BSD again (https://github.com/orbitalquark/textadept/commit/bb14dfe31c87ebf9b1489186c7a023ef6582d952), then this makes sense.