Am Sonntag 26 September 2010 schrieb Bruno Postle:
> The Hugin 2010.2.0 branch doesn't build on fedora f14 (gcc-4.5.1
> glibc-2.12.90), because some libraries need to be explicitly linked
> with vigra_impex. I can fix this here by changing this line in
> src/foreign/vigra/vigra_impex/CMakeLists.txt:
>
> TARGET_LINK_LIBRARIES(huginvigraimpex ${JPEG_LIBRARIES}
> ${OPENEXR_LIBRARIES} ${PNG_LIBRARIES} ${TIFF_LIBRARIES})
>
> ..to this:
>
> TARGET_LINK_LIBRARIES(huginvigraimpex pthread rt ${JPEG_LIBRARIES}
> ${OPENEXR_LIBRARIES} ${PNG_LIBRARIES} ${TIFF_LIBRARIES})
>
> This change is only appropriate for a glibc build, do I wrap this in
> 'IF(UNIX)' or is there some other cmake incantation I need to use?
Please do not. On my system (ubuntu) which is also UNIX, there is no need for
"librt", while "libpthread" is linked
into libhuginvigraimpex automatically.
On the other hand thinking about it, it should not harm either. Both libraries
(pthread, rt) are part of libc6-package here.
Maybe we could search for libs and add these. Something like
...
set(EXTRA_LIBS)
find_library(RT_LIB rt)
find_library(PTHREAD_LIB pthread)
if(RT_LIB)
LIST(ADD EXTRA_LIBS ${RT_LIB})
endif()
if(PTHREAD_LIB)
LIST(ADD EXTRA_LIBS ${PTHREAD_LIB})
endif()
...
TARGET_LINK_LIBRARIES(huginvigraimpex ${EXTRA_LIBS} ${JPEG_LIBRARIES} ...)
Kornel
--
Kornel Benko
[email protected]
signature.asc
Description: This is a digitally signed message part.
