cppcheck/cppcheck-1.81-tinyxml.patch
2017-10-18 16:44:12 +02:00

80 lines
3.7 KiB
Diff

diff -up cppcheck-1.81/cli/CMakeLists.txt.tinyxml cppcheck-1.81/cli/CMakeLists.txt
--- cppcheck-1.81/cli/CMakeLists.txt.tinyxml 2017-10-07 23:11:39.000000000 +0200
+++ cppcheck-1.81/cli/CMakeLists.txt 2017-10-18 16:40:18.898918748 +0200
@@ -1,5 +1,4 @@
include_directories(${PROJECT_SOURCE_DIR}/lib/)
-include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/externals/tinyxml/)
include_directories(${PROJECT_SOURCE_DIR}/externals/simplecpp/)
file(GLOB hdrs "*.h")
@@ -8,10 +7,11 @@ file(GLOB mainfile "main.cpp")
list(REMOVE_ITEM srcs ${mainfile})
add_library(cli_objs OBJECT ${hdrs} ${srcs})
-add_executable(cppcheck ${hdrs} ${mainfile} $<TARGET_OBJECTS:cli_objs> $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:tinyxml_objs> $<TARGET_OBJECTS:simplecpp_objs>)
+add_executable(cppcheck ${hdrs} ${mainfile} $<TARGET_OBJECTS:cli_objs> $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:simplecpp_objs>)
if (HAVE_RULES)
target_link_libraries(cppcheck pcre)
endif()
+target_link_libraries(cppcheck tinyxml2)
install(TARGETS cppcheck
RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}
diff -up cppcheck-1.81/CMakeLists.txt.tinyxml cppcheck-1.81/CMakeLists.txt
--- cppcheck-1.81/CMakeLists.txt.tinyxml 2017-10-07 23:11:39.000000000 +0200
+++ cppcheck-1.81/CMakeLists.txt 2017-10-18 16:40:18.899918734 +0200
@@ -16,7 +16,6 @@ if (BUILD_TESTS)
enable_testing()
endif()
-add_subdirectory(externals/tinyxml)
add_subdirectory(externals/simplecpp)
add_subdirectory(lib) # CppCheck Library
add_subdirectory(cli) # Client application
diff -up cppcheck-1.81/gui/CMakeLists.txt.tinyxml cppcheck-1.81/gui/CMakeLists.txt
--- cppcheck-1.81/gui/CMakeLists.txt.tinyxml 2017-10-07 23:11:39.000000000 +0200
+++ cppcheck-1.81/gui/CMakeLists.txt 2017-10-18 16:41:12.083142778 +0200
@@ -10,7 +10,6 @@ if (BUILD_GUI)
endif()
include_directories(${PROJECT_SOURCE_DIR}/lib/)
- include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/externals/tinyxml/)
file(GLOB hdrs "*.h")
file(GLOB srcs "*.cpp")
@@ -20,10 +19,11 @@ if (BUILD_GUI)
QT5_ADD_RESOURCES(resources "gui.qrc")
QT5_ADD_TRANSLATION(qms ${tss})
- add_executable(cppcheck-gui ${hdrs} ${srcs} ${uis_hdrs} ${resources} ${qms} $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:tinyxml_objs> $<TARGET_OBJECTS:simplecpp_objs>)
+ add_executable(cppcheck-gui ${hdrs} ${srcs} ${uis_hdrs} ${resources} ${qms} $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:simplecpp_objs>)
if (HAVE_RULES)
target_link_libraries(cppcheck-gui pcre)
endif()
+ target_link_libraries(cppcheck-gui tinyxml2)
qt5_use_modules(cppcheck-gui ${GUI_QT_COMPONENTS})
install(TARGETS cppcheck-gui RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} COMPONENT applications)
diff -up cppcheck-1.81/test/CMakeLists.txt.tinyxml cppcheck-1.81/test/CMakeLists.txt
--- cppcheck-1.81/test/CMakeLists.txt.tinyxml 2017-10-07 23:11:39.000000000 +0200
+++ cppcheck-1.81/test/CMakeLists.txt 2017-10-18 16:40:18.900918719 +0200
@@ -1,16 +1,16 @@
if (BUILD_TESTS)
include_directories(${PROJECT_SOURCE_DIR}/lib/ ${PROJECT_SOURCE_DIR}/cli/)
- include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/externals/tinyxml)
include_directories(${PROJECT_SOURCE_DIR}/externals/simplecpp/)
file(GLOB hdrs "*.h")
file(GLOB srcs "*.cpp")
- add_executable(testrunner ${hdrs} ${srcs} $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:cli_objs> $<TARGET_OBJECTS:tinyxml_objs> $<TARGET_OBJECTS:simplecpp_objs>)
+ add_executable(testrunner ${hdrs} ${srcs} $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:cli_objs> $<TARGET_OBJECTS:simplecpp_objs>)
if (HAVE_RULES)
target_link_libraries(testrunner pcre)
endif()
+ target_link_libraries(testrunner tinyxml2)
add_custom_target(copy_cfg ALL
COMMENT "Copying cfg files")