From: <hug...@li...> - 2011-07-19 04:31:23
|
branch: details: http://hugin.hg.sourceforge.net/hgweb/hugin/hugin/hgrepo/h/hu/hugin/hugin/rev/ba85cc921556 changeset: 5429:ba85cc921556 user: Yuval Levy <yu...@us...> date: Tue Jul 19 00:31:10 2011 -0400 description: Detect platform-specific threads library with CMake attempt to fix https://bugs.launchpad.net/hugin/+bug/782767 diffstat: CMakeLists.txt | 1 + src/CMakeLists.txt | 2 +- src/hugin_base/CMakeLists.txt | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diffs (44 lines): diff -r e5cec37b7f53 -r ba85cc921556 CMakeLists.txt --- a/CMakeLists.txt Mon Jul 18 23:33:35 2011 -0400 +++ b/CMakeLists.txt Tue Jul 19 00:31:10 2011 -0400 @@ -285,6 +285,7 @@ MESSAGE(STATUS "Program msgfmt found (${MSGFMT_EXECUTABLE})") ENDIF(MSGFMT_FOUND) +FIND_PACKAGE(Threads) FIND_PACKAGE(ZThread) IF(WIN32) diff -r e5cec37b7f53 -r ba85cc921556 src/CMakeLists.txt --- a/src/CMakeLists.txt Mon Jul 18 23:33:35 2011 -0400 +++ b/src/CMakeLists.txt Tue Jul 19 00:31:10 2011 -0400 @@ -5,7 +5,7 @@ # boost_thread is linked automatically # additionally link to our getopt set(common_libs huginbase hugingetopt - ${PANO_LIBRARIES} ${LAPACK_LIBRARIES} huginlevmar) + ${PANO_LIBRARIES} ${LAPACK_LIBRARIES} huginlevmar ${CMAKE_THREAD_LIBS_INIT}) ELSE(LAPACK_FOUND) set(common_libs huginbase hugingetopt ${PANO_LIBRARIES} huginlevmar) diff -r e5cec37b7f53 -r ba85cc921556 src/hugin_base/CMakeLists.txt --- a/src/hugin_base/CMakeLists.txt Mon Jul 18 23:33:35 2011 -0400 +++ b/src/hugin_base/CMakeLists.txt Tue Jul 19 00:31:10 2011 -0400 @@ -124,7 +124,7 @@ IF (${HUGIN_SHARED_LIBS}) add_library(huginbase SHARED ${HUGIN_BASE_SRC} ${HUGIN_BASE_HEADER}) - target_link_libraries(huginbase ${Boost_LIBRARIES}) + target_link_libraries(huginbase ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) set_target_properties(huginbase PROPERTIES VERSION ${HUGIN_LIB_VERSION}) IF(WIN32) install(TARGETS huginbase RUNTIME DESTINATION ${BINDIR}) @@ -140,7 +140,7 @@ TARGET_LINK_LIBRARIES(huginbase huginlevmar huginvigraimpex makefilelib ${Boost_LIBRARIES} ${EXIV2_LIBRARIES} ${PANO_LIBRARIES} ${TIFF_LIBRARIES} ${LAPACK_LIBRARIES} ${GLEW_LIBRARIES} - ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES}) + ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) add_subdirectory(makefilelib) add_subdirectory(lines) |