From 33f5d4673d999070f410429da618dfa5ca541791 Mon Sep 17 00:00:00 2001 From: Michal Nowicki Date: Mon, 19 Jun 2017 17:19:21 +0200 Subject: [PATCH 1/2] Correcting linking error with pthread --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c3ad81921..4c4cf2da2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -119,7 +119,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} pthread) else() message("--- not building dso_dataset, since either don't have openCV or Pangolin.") endif() From 8b353890411f7dbccdd56ab82565b3b9ebb4c7b4 Mon Sep 17 00:00:00 2001 From: Michal Nowicki Date: Thu, 27 Jul 2017 14:09:35 +0200 Subject: [PATCH 2/2] Making it cross-platform and quiet --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c4cf2da2..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} pthread) + 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()