This commit is contained in:
Stefano Sinigardi 2019-06-12 16:45:48 +02:00
parent 7701a8cf54
commit 1b7a0dca09
1 changed files with 3 additions and 4 deletions

View File

@ -82,8 +82,8 @@ if(ENABLE_OPENCV)
find_package(OpenCV) find_package(OpenCV)
endif() endif()
find_package(Stb REQUIRED) find_package(Stb REQUIRED)
if(${CMAKE_VERSION} VERSION_LESS "3.9.0") if(${CMAKE_VERSION} VERSION_LESS "3.11.0")
message(WARNING "To build with OpenMP support you need CMake 3.9.0+") message(WARNING "To build with OpenMP support you need CMake 3.11.0+")
else() else()
find_package(OpenMP) find_package(OpenMP)
endif() endif()
@ -280,7 +280,7 @@ if(OpenCV_FOUND)
target_compile_definitions(dark PUBLIC -DOPENCV) target_compile_definitions(dark PUBLIC -DOPENCV)
endif() endif()
if(WIN32 AND OPENMP_FOUND) if(OPENMP_FOUND)
target_link_libraries(darknet PUBLIC OpenMP::OpenMP_CXX) target_link_libraries(darknet PUBLIC OpenMP::OpenMP_CXX)
target_link_libraries(darknet PUBLIC OpenMP::OpenMP_C) target_link_libraries(darknet PUBLIC OpenMP::OpenMP_C)
target_link_libraries(dark PUBLIC OpenMP::OpenMP_CXX) target_link_libraries(dark PUBLIC OpenMP::OpenMP_CXX)
@ -304,7 +304,6 @@ endif()
target_link_libraries(darknet PRIVATE Threads::Threads) target_link_libraries(darknet PRIVATE Threads::Threads)
target_link_libraries(dark PRIVATE Threads::Threads) target_link_libraries(dark PRIVATE Threads::Threads)
target_link_libraries(uselib PRIVATE Threads::Threads)
if(ENABLE_ZED_CAMERA) if(ENABLE_ZED_CAMERA)
target_link_libraries(darknet PRIVATE ${ZED_LIBRARIES}) target_link_libraries(darknet PRIVATE ${ZED_LIBRARIES})