--- a/src/cpp/CMakeLists.txt
+++ b/src/cpp/CMakeLists.txt
@@ -95,7 +95,7 @@
         target_link_libraries(flann ${LZ4_LINK_LIBRARIES})
 
         if(MINGW AND OPENMP_FOUND)
-          target_link_libraries(flann gomp)
+          target_link_libraries(flann OpenMP::OpenMP_CXX)
         endif()
     endif()
 
