diff --git a/CMakeLists.txt b/CMakeLists.txt index c3ad81921..fb06d5716 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,6 +21,7 @@ find_package(Boost COMPONENTS system thread) find_package(LibZip QUIET) find_package(Pangolin 0.2 QUIET) find_package(OpenCV QUIET) +FIND_PACKAGE(Threads QUIET) # flags add_definitions("-DENABLE_SSE") @@ -119,7 +120,7 @@ add_library(dso ${dso_SOURCE_FILES} ${dso_opencv_SOURCE_FILES} ${dso_pangolin_SO if (OpenCV_FOUND AND Pangolin_FOUND) message("--- compiling dso_dataset.") add_executable(dso_dataset ${PROJECT_SOURCE_DIR}/src/main_dso_pangolin.cpp ) - target_link_libraries(dso_dataset dso boost_system boost_thread cxsparse ${LIBZIP_LIBRARY} ${Pangolin_LIBRARIES} ${OpenCV_LIBS}) + target_link_libraries(dso_dataset dso boost_system boost_thread cxsparse ${LIBZIP_LIBRARY} ${Pangolin_LIBRARIES} ${OpenCV_LIBS} ${CMAKE_THREAD_LIBS_INIT}) else() message("--- not building dso_dataset, since either don't have openCV or Pangolin.") endif()