From 33315b0ae5d4f2a34b8b2a8c9dbbea146f8efbe9 Mon Sep 17 00:00:00 2001 From: "Georgi D. Sotirov" Date: Tue, 15 Mar 2022 22:17:03 +0200 Subject: [PATCH] Replace tinyxml2_LIBRARY with tinyxml2_LIBRARIES (#3897) --- cli/CMakeLists.txt | 2 +- cmake/findDependencies.cmake | 4 ++-- cmake/printInfo.cmake | 2 +- gui/CMakeLists.txt | 2 +- gui/test/benchmark/simple/CMakeLists.txt | 4 ++-- gui/test/xmlreportv2/CMakeLists.txt | 4 ++-- oss-fuzz/CMakeLists.txt | 2 +- test/CMakeLists.txt | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cli/CMakeLists.txt b/cli/CMakeLists.txt index 54b314f61..626b968dc 100644 --- a/cli/CMakeLists.txt +++ b/cli/CMakeLists.txt @@ -40,7 +40,7 @@ if (WIN32 AND NOT BORLAND) endif() endif() if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2) - target_link_libraries(cppcheck ${tinyxml2_LIBRARY}) + target_link_libraries(cppcheck ${tinyxml2_LIBRARIES}) endif() if (USE_THREADS) target_link_libraries(cppcheck ${CMAKE_THREAD_LIBS_INIT}) diff --git a/cmake/findDependencies.cmake b/cmake/findDependencies.cmake index 9e27704f2..d1cf61848 100644 --- a/cmake/findDependencies.cmake +++ b/cmake/findDependencies.cmake @@ -48,8 +48,8 @@ endif() if (NOT USE_BUNDLED_TINYXML2) find_package(tinyxml2 QUIET) if (NOT tinyxml2_FOUND) - find_library(tinyxml2_LIBRARY tinyxml2) - if (NOT tinyxml2_LIBRARY) + find_library(tinyxml2_LIBRARIES tinyxml2) + if (NOT tinyxml2_LIBRARIES) message(FATAL_ERROR "tinyxml2 has not been found") else() set(tinyxml2_FOUND 1) diff --git a/cmake/printInfo.cmake b/cmake/printInfo.cmake index 5afd5f235..6d19cd631 100644 --- a/cmake/printInfo.cmake +++ b/cmake/printInfo.cmake @@ -64,7 +64,7 @@ if (USE_Z3) endif() message( STATUS "USE_BUNDLED_TINYXML2 = ${USE_BUNDLED_TINYXML2}" ) if (NOT USE_BUNDLED_TINYXML2) - message(STATUS "tinyxml2_LIBRARY = ${tinyxml2_LIBRARY}") + message(STATUS "tinyxml2_LIBRARIES = ${tinyxml2_LIBRARIES}") endif() message( STATUS ) diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index 0106d4d76..6c0447d47 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) + target_link_libraries(cppcheck-gui ${tinyxml2_LIBRARIES}) endif() target_link_libraries(cppcheck-gui ${QT_CORE_LIB} ${QT_GUI_LIB} ${QT_WIDGETS_LIB} ${QT_PRINTSUPPORT_LIB} ${QT_HELP_LIB}) if(WITH_QCHART) diff --git a/gui/test/benchmark/simple/CMakeLists.txt b/gui/test/benchmark/simple/CMakeLists.txt index 933a10a29..2d7b716bc 100644 --- a/gui/test/benchmark/simple/CMakeLists.txt +++ b/gui/test/benchmark/simple/CMakeLists.txt @@ -20,7 +20,7 @@ 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_LIBRARY}) + target_link_libraries(benchmark-simple ${tinyxml2_LIBRARIES}) endif() if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") @@ -30,4 +30,4 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") endif() # caused by Q_UNUSED macro set_source_files_properties(moc_benchmarksimple.cpp PROPERTIES COMPILE_FLAGS -Wno-extra-semi-stmt) -endif() \ No newline at end of file +endif() diff --git a/gui/test/xmlreportv2/CMakeLists.txt b/gui/test/xmlreportv2/CMakeLists.txt index c34537fdf..028e61059 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_LIBRARY}) -endif() \ No newline at end of file + target_link_libraries(test-xmlreportv2 ${tinyxml2_LIBRARIES}) +endif() diff --git a/oss-fuzz/CMakeLists.txt b/oss-fuzz/CMakeLists.txt index 5b2c5e059..e3117b05a 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) + target_link_libraries(fuzz-client PRIVATE ${tinyxml2_LIBRARIES}) endif() add_executable(translate EXCLUDE_FROM_ALL diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 42fd64173..08244aa3c 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_LIBRARY}) + target_link_libraries(testrunner ${tinyxml2_LIBRARIES}) endif() if (USE_THREADS) target_link_libraries(testrunner ${CMAKE_THREAD_LIBS_INIT})