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})
|