summaryrefslogtreecommitdiff
path: root/math/plplot/files/patch-bindings_ocaml_CMakeLists.txt
blob: 1e6cb8c502b4eed7cf2ad65fc4a8839cf4c3fdb3 (plain) (blame)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
--- bindings/ocaml/CMakeLists.txt.orig	2019-06-01 23:24:33 UTC
+++ bindings/ocaml/CMakeLists.txt
@@ -1,11 +1,11 @@
 # -*- mode: cmake -*-
 # bindings/ocaml/CMakeLists.txt
 #
+# Copyright (C) 2008-2011 Andrew Ross
+# Copyright (C) 2008-2021 Alan W. Irwin
+# Copyright (C) 2009-2013 Hezekiah M. Carty
+# Patch borrowed from https://sourceforge.net/p/plplot/plplot/ci/52479b8830ee02900b41fe3ec947aed6b1841a48/
 #
-# Copyright (C) 2008 Andrew Ross
-# Copyright (C) 2009 Hezekiah M. Carty
-# Copyright (C) 2009-2018 Alan W. Irwin
-#
 # This file is part of PLplot.
 #
 # PLplot is free software; you can redistribute it and/or modify
@@ -142,9 +142,9 @@ if(ENABLE_ocaml)
       list(APPEND ocaml_LIBRARIES_FLAGS ${LIBRARY_LIST})
     endforeach(library in LISTS library_LIST)
 
-    # Get rid of internal symbolic targets and symbolic Qt5 targets from the list
+    # Get rid of internal, Threads, Qt5, and Qhull symbolic targets from the list.
     #message(STATUS "DEBUG: (original) ocaml_LIBRARIES_FLAGS = ${ocaml_LIBRARIES_FLAGS}")
-    list(FILTER ocaml_LIBRARIES_FLAGS EXCLUDE REGEX "^PLPLOT::csirocsa$|^PLPLOT::csironn$|^PLPLOT::nistcd$|^PLPLOT::qsastime$|^Qt5::")
+    list(FILTER ocaml_LIBRARIES_FLAGS EXCLUDE REGEX "^PLPLOT::csirocsa$|^PLPLOT::csironn$|^PLPLOT::nistcd$|^PLPLOT::qsastime$|^Threads::Threads$|^Qt5::|Qhull::")
     #message(STATUS "DEBUG: (filtered) ocaml_LIBRARIES_FLAGS = ${ocaml_LIBRARIES_FLAGS}")
 
     # Add C++ libraries in case there is at least one C++ device
@@ -159,6 +159,17 @@ if(ENABLE_ocaml)
       list(APPEND ocaml_LIBRARIES_FLAGS ${pc_qt_LIBRARIES_LIST})
       #message(STATUS "DEBUG: (Qt5 added) ocaml_LIBRARIES_FLAGS = ${ocaml_LIBRARIES_FLAGS}")
     endif(PLPLOT_USE_QT5)
+
+    # Add back actual qhull_r library to replace the symbolic
+    # form of Qhull library that was removed above.
+    if(PL_HAVE_QHULL)
+      list(APPEND ocaml_LIBRARIES_FLAGS )
+      if(QHULL_RPATH)
+	list(APPEND ocaml_LIBRARIES_FLAGS -L${QHULL_RPATH} -lqhull_r)
+      else(QHULL_RPATH)
+	list(APPEND ocaml_LIBRARIES_FLAGS -lqhull_r)
+      endif(QHULL_RPATH)
+    endif(PL_HAVE_QHULL)
 
     # There is a long-standing bug for cmake where the regexp "^[^-]"
     # acts the same as "[^-]", i.e., the starting anchor is ignored.