Lines 1-6
Link Here
|
1 |
--- common/CMakeLists.txt |
1 |
--- common/CMakeLists.txt |
2 |
+++ common/CMakeLists.txt |
2 |
+++ common/CMakeLists.txt |
3 |
@@ -54,16 +54,22 @@ ELSEIF (WIN32) |
3 |
@@ -54,16 +54,29 @@ ELSEIF (WIN32) |
4 |
) |
4 |
) |
5 |
ELSEIF (CMAKE_SYSTEM_NAME MATCHES "FreeBSD") |
5 |
ELSEIF (CMAKE_SYSTEM_NAME MATCHES "FreeBSD") |
6 |
#### FreeBSD #### |
6 |
#### FreeBSD #### |
Lines 18-24
Link Here
|
18 |
- ) |
18 |
- ) |
19 |
+ |
19 |
+ |
20 |
+ # FreeBSD 10 has iconv built in to libc |
20 |
+ # FreeBSD 10 has iconv built in to libc |
21 |
+ IF(FREEBSD_RELEASE LESS 10) |
21 |
+ # However, if user has libiconv package installed, clang will find that header first, |
|
|
22 |
+ # and we'd get a link error unless -liconv is added. This will at least let it build; we cannot |
23 |
+ # force the user to NOT have libiconv installed. |
24 |
+ # "proper" fix would be to force clang/gcc to use system header. How? |
25 |
+ IF( (FREEBSD_RELEASE LESS 10) OR (EXISTS "/usr/local/include/iconv.h")) |
26 |
+ IF(NOT (FREEBSD_RELEASE LESS 10)) |
27 |
+ MESSAGE(WARNING "building with libiconv from package instead of base. Port will fail?") |
28 |
+ ENDIF() |
22 |
+ FIND_LIBRARY(ICONV_LIBRARY iconv) |
29 |
+ FIND_LIBRARY(ICONV_LIBRARY iconv) |
23 |
+ LIST(APPEND telldus-common_LIBRARIES |
30 |
+ LIST(APPEND telldus-common_LIBRARIES |
24 |
+ ${ICONV_LIBRARY} |
31 |
+ ${ICONV_LIBRARY} |