From ef547dcd11e93d4004ae397272943d57bccd23f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20St=C3=B6ggl?= Date: Sat, 19 Mar 2022 17:20:53 +0100 Subject: [PATCH] Simplify cppcheck-2.7.3-tinyxml2.patch --- cppcheck-2.7.3-tinyxml2.patch | 99 +++++------------------------------ 1 file changed, 13 insertions(+), 86 deletions(-) diff --git a/cppcheck-2.7.3-tinyxml2.patch b/cppcheck-2.7.3-tinyxml2.patch index d07c86d..be17894 100644 --- a/cppcheck-2.7.3-tinyxml2.patch +++ b/cppcheck-2.7.3-tinyxml2.patch @@ -1,88 +1,15 @@ -diff --git a/cli/CMakeLists.txt b/cli/CMakeLists.txt -index 629354086..7ec2288fe 100644 ---- a/cli/CMakeLists.txt -+++ b/cli/CMakeLists.txt -@@ -35,7 +35,7 @@ if (WIN32 AND NOT BORLAND) - endif() - endif() - if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2) -- target_link_libraries(cppcheck ${tinyxml2_LIBRARIES}) -+ target_link_libraries(cppcheck tinyxml2) - endif() +diff --git a/cmake/findDependencies.cmake b/cmake/findDependencies.cmake +index 4d5b9efc5..6f6d9210c 100644 +--- a/cmake/findDependencies.cmake ++++ b/cmake/findDependencies.cmake +@@ -48,7 +48,9 @@ endif() - add_dependencies(cppcheck copy_cfg) -diff --git a/cmake/printInfo.cmake b/cmake/printInfo.cmake -index 2fd971b1d..8bf497304 100644 ---- a/cmake/printInfo.cmake -+++ b/cmake/printInfo.cmake -@@ -54,7 +54,7 @@ if (USE_Z3) - endif() - message( STATUS "USE_BUNDLED_TINYXML2 = ${USE_BUNDLED_TINYXML2}" ) if (NOT USE_BUNDLED_TINYXML2) -- message(STATUS "tinyxml2_LIBRARIES = ${tinyxml2_LIBRARIES}") -+ message(STATUS "tinyxml2_LIBRARIES = tinyxml2") - endif() - message( STATUS ) - -diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt -index 4f265f7fc..213ad5918 100644 ---- a/gui/CMakeLists.txt -+++ b/gui/CMakeLists.txt -@@ -36,7 +36,7 @@ if (BUILD_GUI) - target_link_libraries(cppcheck-gui ${Z3_LIBRARIES}) - endif() - if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2) -- target_link_libraries(cppcheck-gui ${tinyxml2_LIBRARIES}) -+ target_link_libraries(cppcheck-gui tinyxml2) - endif() - target_link_libraries(cppcheck-gui Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport Qt5::Help) - if(WITH_QCHART) -diff --git a/gui/test/benchmark/simple/CMakeLists.txt b/gui/test/benchmark/simple/CMakeLists.txt -index c6c6cd672..81351e719 100644 ---- a/gui/test/benchmark/simple/CMakeLists.txt -+++ b/gui/test/benchmark/simple/CMakeLists.txt -@@ -20,5 +20,5 @@ if (USE_Z3) - target_link_libraries(benchmark-simple ${Z3_LIBRARIES}) - endif() - if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2) -- target_link_libraries(benchmark-simple ${tinyxml2_LIBRARIES}) -+ target_link_libraries(benchmark-simple tinyxml2) - endif() -\ No newline at end of file -diff --git a/gui/test/xmlreportv2/CMakeLists.txt b/gui/test/xmlreportv2/CMakeLists.txt -index 97932d8e8..5dd39465c 100644 ---- a/gui/test/xmlreportv2/CMakeLists.txt -+++ b/gui/test/xmlreportv2/CMakeLists.txt -@@ -24,5 +24,5 @@ if (USE_Z3) - target_link_libraries(test-xmlreportv2 ${Z3_LIBRARIES}) - endif() - if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2) -- target_link_libraries(test-xmlreportv2 ${tinyxml2_LIBRARIES}) -+ target_link_libraries(test-xmlreportv2 tinyxml2) - endif() -diff --git a/oss-fuzz/CMakeLists.txt b/oss-fuzz/CMakeLists.txt -index e3117b05a..5b2c5e059 100644 ---- a/oss-fuzz/CMakeLists.txt -+++ b/oss-fuzz/CMakeLists.txt -@@ -25,7 +25,7 @@ if (ENABLE_OSS_FUZZ AND CMAKE_CXX_COMPILER_ID MATCHES "Clang") - target_link_libraries(fuzz-client PRIVATE ${Z3_LIBRARIES}) - endif() - if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2) -- target_link_libraries(fuzz-client PRIVATE ${tinyxml2_LIBRARIES}) -+ target_link_libraries(fuzz-client PRIVATE tinyxml2) - endif() - - add_executable(translate EXCLUDE_FROM_ALL -diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt -index 082ca253a..2cc49fe99 100644 ---- a/test/CMakeLists.txt -+++ b/test/CMakeLists.txt -@@ -26,7 +26,7 @@ if (BUILD_TESTS) - endif() - endif() - if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2) -- target_link_libraries(testrunner ${tinyxml2_LIBRARIES}) -+ target_link_libraries(testrunner tinyxml2) - endif() - - if (NOT CMAKE_DISABLE_PRECOMPILE_HEADERS) + find_package(tinyxml2 QUIET) +- if (NOT tinyxml2_FOUND) ++ if (tinyxml2_FOUND) ++ set(tinyxml2_LIBRARIES "tinyxml2") ++ else() + find_library(tinyxml2_LIBRARIES tinyxml2) + if (NOT tinyxml2_LIBRARIES) + message(FATAL_ERROR "tinyxml2 has not been found")