Merge pull request #3389 from adujardin/master

Fix Ubuntu cmake compilation
This commit is contained in:
Alexey 2019-06-12 12:09:30 +03:00 committed by GitHub
commit e4f6b276e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -274,7 +274,7 @@ if(OpenCV_FOUND)
target_compile_definitions(dark PUBLIC -DOPENCV)
endif()
if(OPENMP_FOUND)
if(WIN32 AND 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)
@ -298,6 +298,7 @@ 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})