File: 0003-fix-dynamic-linking.patch

package info (click to toggle)
castxml 0.1%2Bgit20180702-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,268 kB
  • sloc: cpp: 4,298; ansic: 267; sh: 85; makefile: 13
file content (28 lines) | stat: -rw-r--r-- 682 bytes parent folder | download
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
Author: praetorian20@github
Description: Don't double link against certain llvm libraries

--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -65,10 +65,18 @@
   RunClang.cxx RunClang.h
   Utils.cxx Utils.h
   )
-target_link_libraries(castxml
-  ${clang_libs}
-  ${llvm_libs}
-  )
+if (${LLVM_VERSION_MAJOR} LESS 6)
+  target_link_libraries(castxml
+    ${clang_libs}
+    ${llvm_libs}
+    )
+else()
+  target_link_libraries(castxml
+    ${clang_libs}
+    LLVM
+    )
+endif()
+
 set_property(SOURCE Utils.cxx APPEND PROPERTY COMPILE_DEFINITIONS
   "CASTXML_INSTALL_DATA_DIR=\"${CastXML_INSTALL_DATA_DIR}\"")
 install(TARGETS castxml DESTINATION ${CastXML_INSTALL_RUNTIME_DIR})