From 1b7a0dca0930c756730cee98ae91bf045f12091e Mon Sep 17 00:00:00 2001 From: Stefano Sinigardi Date: Wed, 12 Jun 2019 16:45:48 +0200 Subject: [PATCH] revert #3389 --- CMakeLists.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 040a921d..a4ce165d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,8 +82,8 @@ if(ENABLE_OPENCV) find_package(OpenCV) endif() find_package(Stb REQUIRED) -if(${CMAKE_VERSION} VERSION_LESS "3.9.0") - message(WARNING "To build with OpenMP support you need CMake 3.9.0+") +if(${CMAKE_VERSION} VERSION_LESS "3.11.0") + message(WARNING "To build with OpenMP support you need CMake 3.11.0+") else() find_package(OpenMP) endif() @@ -280,7 +280,7 @@ if(OpenCV_FOUND) target_compile_definitions(dark PUBLIC -DOPENCV) endif() -if(WIN32 AND OPENMP_FOUND) +if(OPENMP_FOUND) target_link_libraries(darknet PUBLIC OpenMP::OpenMP_CXX) target_link_libraries(darknet PUBLIC OpenMP::OpenMP_C) target_link_libraries(dark PUBLIC OpenMP::OpenMP_CXX) @@ -304,7 +304,6 @@ endif() target_link_libraries(darknet PRIVATE Threads::Threads) target_link_libraries(dark PRIVATE Threads::Threads) -target_link_libraries(uselib PRIVATE Threads::Threads) if(ENABLE_ZED_CAMERA) target_link_libraries(darknet PRIVATE ${ZED_LIBRARIES})