Skip to content

Commit dd32660

Browse files
gdsotirovfirewave
authored andcommitted
Replace tinyxml2_LIBRARY with tinyxml2_LIBRARIES (cppcheck-opensource#3897)
1 parent c91f05f commit dd32660

8 files changed

Lines changed: 12 additions & 9 deletions

File tree

cli/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ if (WIN32 AND NOT BORLAND)
3535
endif()
3636
endif()
3737
if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2)
38-
target_link_libraries(cppcheck ${tinyxml2_LIBRARY})
38+
target_link_libraries(cppcheck ${tinyxml2_LIBRARIES})
3939
endif()
4040

4141
add_dependencies(cppcheck copy_cfg)

cmake/findDependencies.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ endif()
4949
if (NOT USE_BUNDLED_TINYXML2)
5050
find_package(tinyxml2 QUIET)
5151
if (NOT tinyxml2_FOUND)
52-
find_library(tinyxml2_LIBRARY tinyxml2)
53-
if (NOT tinyxml2_LIBRARY)
52+
find_library(tinyxml2_LIBRARIES tinyxml2)
53+
if (NOT tinyxml2_LIBRARIES)
5454
message(FATAL_ERROR "tinyxml2 has not been found")
5555
else()
5656
message(STATUS "tinyxml2_LIBRARY: ${tinyxml2_LIBRARY}")

cmake/printInfo.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ if (USE_Z3)
5353
message( STATUS "Z3_CXX_INCLUDE_DIRS = ${Z3_CXX_INCLUDE_DIRS}" )
5454
endif()
5555
message( STATUS "USE_BUNDLED_TINYXML2 = ${USE_BUNDLED_TINYXML2}" )
56+
if (NOT USE_BUNDLED_TINYXML2)
57+
message(STATUS "tinyxml2_LIBRARIES = ${tinyxml2_LIBRARIES}")
58+
endif()
5659
message( STATUS )
5760

5861
if(${ANALYZE_ADDRESS})

gui/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ if (BUILD_GUI)
3636
target_link_libraries(cppcheck-gui ${Z3_LIBRARIES})
3737
endif()
3838
if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2)
39-
target_link_libraries(cppcheck-gui tinyxml2)
39+
target_link_libraries(cppcheck-gui ${tinyxml2_LIBRARIES})
4040
endif()
4141
target_link_libraries(cppcheck-gui Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport Qt5::Help)
4242
if(WITH_QCHART)

gui/test/benchmark/simple/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ if (USE_Z3)
2020
target_link_libraries(benchmark-simple ${Z3_LIBRARIES})
2121
endif()
2222
if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2)
23-
target_link_libraries(benchmark-simple ${tinyxml2_LIBRARY})
23+
target_link_libraries(benchmark-simple ${tinyxml2_LIBRARIES})
2424
endif()

gui/test/xmlreportv2/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ if (USE_Z3)
2424
target_link_libraries(test-xmlreportv2 ${Z3_LIBRARIES})
2525
endif()
2626
if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2)
27-
target_link_libraries(test-xmlreportv2 ${tinyxml2_LIBRARY})
28-
endif()
27+
target_link_libraries(test-xmlreportv2 ${tinyxml2_LIBRARIES})
28+
endif()

oss-fuzz/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ if (ENABLE_OSS_FUZZ AND CMAKE_CXX_COMPILER_ID MATCHES "Clang")
2525
target_link_libraries(fuzz-client PRIVATE ${Z3_LIBRARIES})
2626
endif()
2727
if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2)
28-
target_link_libraries(fuzz-client PRIVATE tinyxml2)
28+
target_link_libraries(fuzz-client PRIVATE ${tinyxml2_LIBRARIES})
2929
endif()
3030

3131
add_executable(translate EXCLUDE_FROM_ALL

test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ if (BUILD_TESTS)
2626
endif()
2727
endif()
2828
if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2)
29-
target_link_libraries(testrunner ${tinyxml2_LIBRARY})
29+
target_link_libraries(testrunner ${tinyxml2_LIBRARIES})
3030
endif()
3131

3232
if (NOT CMAKE_DISABLE_PRECOMPILE_HEADERS)

0 commit comments

Comments
 (0)