summaryrefslogtreecommitdiffstats
path: root/src/flann-2-Fix-openmp-on-mingw.patch
blob: f6f0f13cc8c2a93e9e56b728175259edb83d8567 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
This file is part of MXE. See LICENSE.md for licensing information.

From ce062a2d900aa215c301d327084a6d04da283005 Mon Sep 17 00:00:00 2001
From: Timothy Gu <timothygu99@gmail.com>
Date: Mon, 11 Aug 2014 10:45:43 -0700
Subject: [PATCH] Fix OpenMP on MinGW

Based on patch by https://github.com/mariusmuja/flann/pull/104

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
---
 src/cpp/CMakeLists.txt | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt
index 7e6e353..0218f50 100644
--- a/src/cpp/CMakeLists.txt
+++ b/src/cpp/CMakeLists.txt
@@ -68,6 +68,10 @@ if (BUILD_C_BINDINGS)
             RUNTIME DESTINATION share/flann/matlab
         )
     endif(WIN32 AND BUILD_SHARED_LIBS)
+
+    if(MINGW AND USE_OPENMP)
+        target_link_libraries(flann -lgomp)
+    endif(MINGW AND USE_OPENMP)
 endif()
 
 install (
-- 
1.9.1