diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2012-11-19 12:51:35 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2012-11-19 12:51:35 +0400 |
commit | 67031c1712eae091dd8c1ffaab43b7d9508bd446 (patch) | |
tree | 411a7900d33ecfe57ebb29e84f7aeb53c7c1cd09 /build_files/cmake/macros.cmake | |
parent | 509e178f72565c3c45b56444dc5289acafb3ad96 (diff) |
Fix when statically linking with distro's boost: in this case, we most likely also need to statically link against icu, as most boost packages are built with it. Without that, you get a bunch of errors at link time (when using boost_locale, or, in freestyle branch, boost_regex).
So when you enable Boost_USE_STATIC_LIBS, you should also set Boost_USE_ICU to True. Will add a note about that in build doc too.
Diffstat (limited to 'build_files/cmake/macros.cmake')
-rw-r--r-- | build_files/cmake/macros.cmake | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index 4f1d34f993c..efa258aa9dc 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -312,6 +312,9 @@ macro(setup_liblinks endif() if(WITH_BOOST) target_link_libraries(${target} ${BOOST_LIBRARIES}) + if(Boost_USE_STATIC_LIBS AND Boost_USE_ICU) + target_link_libraries(${target} ${ICU_LIBRARIES}) + endif() endif() target_link_libraries(${target} ${JPEG_LIBRARIES}) if(WITH_IMAGE_OPENEXR) |