|
|
9d1bd55 |
diff -ur cppcheck-1.85.orig/cli/CMakeLists.txt cppcheck-1.85/cli/CMakeLists.txt
|
|
|
9d1bd55 |
--- cppcheck-1.85.orig/cli/CMakeLists.txt 2018-10-14 14:56:51.000000000 +0200
|
|
|
9d1bd55 |
+++ cppcheck-1.85/cli/CMakeLists.txt 2018-11-08 15:31:17.285998825 +0100
|
|
|
e13f8f2 |
@@ -1,5 +1,4 @@
|
|
|
2825eff |
include_directories(${PROJECT_SOURCE_DIR}/lib/)
|
|
|
2825eff |
-include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/externals/tinyxml/)
|
|
|
d836748 |
include_directories(${PROJECT_SOURCE_DIR}/externals/simplecpp/)
|
|
|
2825eff |
|
|
|
2825eff |
file(GLOB hdrs "*.h")
|
|
|
e13f8f2 |
@@ -8,13 +7,14 @@
|
|
|
2825eff |
list(REMOVE_ITEM srcs ${mainfile})
|
|
|
2825eff |
|
|
|
2825eff |
add_library(cli_objs OBJECT ${hdrs} ${srcs})
|
|
|
d836748 |
-add_executable(cppcheck ${hdrs} ${mainfile} $<TARGET_OBJECTS:cli_objs> $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:tinyxml_objs> $<TARGET_OBJECTS:simplecpp_objs>)
|
|
|
d836748 |
+add_executable(cppcheck ${hdrs} ${mainfile} $<TARGET_OBJECTS:cli_objs> $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:simplecpp_objs>)
|
|
|
2825eff |
if (HAVE_RULES)
|
|
|
2825eff |
target_link_libraries(cppcheck pcre)
|
|
|
2825eff |
endif()
|
|
|
9d1bd55 |
if (WIN32 AND NOT BORLAND)
|
|
|
d4f19b3 |
target_link_libraries(cppcheck Shlwapi.lib)
|
|
|
d4f19b3 |
endif()
|
|
|
d836748 |
+target_link_libraries(cppcheck tinyxml2)
|
|
|
2825eff |
|
|
|
2825eff |
install(TARGETS cppcheck
|
|
|
2825eff |
RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}
|
|
|
9d1bd55 |
diff -ur cppcheck-1.85.orig/CMakeLists.txt cppcheck-1.85/CMakeLists.txt
|
|
|
9d1bd55 |
--- cppcheck-1.85.orig/CMakeLists.txt 2018-10-14 14:56:51.000000000 +0200
|
|
|
9d1bd55 |
+++ cppcheck-1.85/CMakeLists.txt 2018-11-08 15:28:12.574001686 +0100
|
|
|
e13f8f2 |
@@ -16,7 +16,6 @@
|
|
|
2825eff |
enable_testing()
|
|
|
2825eff |
endif()
|
|
|
2825eff |
|
|
|
2825eff |
-add_subdirectory(externals/tinyxml)
|
|
|
d836748 |
add_subdirectory(externals/simplecpp)
|
|
|
2825eff |
add_subdirectory(lib) # CppCheck Library
|
|
|
2825eff |
add_subdirectory(cli) # Client application
|
|
|
9d1bd55 |
diff -ur cppcheck-1.85.orig/gui/CMakeLists.txt cppcheck-1.85/gui/CMakeLists.txt
|
|
|
9d1bd55 |
--- cppcheck-1.85.orig/gui/CMakeLists.txt 2018-10-14 14:56:51.000000000 +0200
|
|
|
9d1bd55 |
+++ cppcheck-1.85/gui/CMakeLists.txt 2018-11-08 15:28:12.575001686 +0100
|
|
|
e13f8f2 |
@@ -10,7 +10,6 @@
|
|
|
f8cc68f |
endif()
|
|
|
f8cc68f |
|
|
|
f8cc68f |
include_directories(${PROJECT_SOURCE_DIR}/lib/)
|
|
|
f8cc68f |
- include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/externals/tinyxml/)
|
|
|
f8cc68f |
|
|
|
f8cc68f |
file(GLOB hdrs "*.h")
|
|
|
f8cc68f |
file(GLOB srcs "*.cpp")
|
|
|
e13f8f2 |
@@ -20,11 +19,11 @@
|
|
|
f8cc68f |
QT5_ADD_RESOURCES(resources "gui.qrc")
|
|
|
f8cc68f |
QT5_ADD_TRANSLATION(qms ${tss})
|
|
|
f8cc68f |
|
|
|
f8cc68f |
- add_executable(cppcheck-gui ${hdrs} ${srcs} ${uis_hdrs} ${resources} ${qms} $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:tinyxml_objs> $<TARGET_OBJECTS:simplecpp_objs>)
|
|
|
f8cc68f |
+ add_executable(cppcheck-gui ${hdrs} ${srcs} ${uis_hdrs} ${resources} ${qms} $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:simplecpp_objs>)
|
|
|
f8cc68f |
if (HAVE_RULES)
|
|
|
f8cc68f |
target_link_libraries(cppcheck-gui pcre)
|
|
|
f8cc68f |
endif()
|
|
|
e13f8f2 |
- target_link_libraries(cppcheck-gui Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport)
|
|
|
e13f8f2 |
+ target_link_libraries(cppcheck-gui tinyxml2 Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport)
|
|
|
f8cc68f |
|
|
|
f8cc68f |
install(TARGETS cppcheck-gui RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} COMPONENT applications)
|
|
|
e13f8f2 |
install(FILES ${qms} DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} COMPONENT applications)
|
|
|
9d1bd55 |
diff -ur cppcheck-1.85.orig/test/CMakeLists.txt cppcheck-1.85/test/CMakeLists.txt
|
|
|
9d1bd55 |
--- cppcheck-1.85.orig/test/CMakeLists.txt 2018-10-14 14:56:51.000000000 +0200
|
|
|
9d1bd55 |
+++ cppcheck-1.85/test/CMakeLists.txt 2018-11-08 15:28:12.575001686 +0100
|
|
|
e13f8f2 |
@@ -1,16 +1,16 @@
|
|
|
2825eff |
if (BUILD_TESTS)
|
|
|
2825eff |
|
|
|
2825eff |
include_directories(${PROJECT_SOURCE_DIR}/lib/ ${PROJECT_SOURCE_DIR}/cli/)
|
|
|
2825eff |
- include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/externals/tinyxml)
|
|
|
d836748 |
include_directories(${PROJECT_SOURCE_DIR}/externals/simplecpp/)
|
|
|
2825eff |
|
|
|
2825eff |
file(GLOB hdrs "*.h")
|
|
|
2825eff |
file(GLOB srcs "*.cpp")
|
|
|
2825eff |
|
|
|
d836748 |
- add_executable(testrunner ${hdrs} ${srcs} $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:cli_objs> $<TARGET_OBJECTS:tinyxml_objs> $<TARGET_OBJECTS:simplecpp_objs>)
|
|
|
d836748 |
+ add_executable(testrunner ${hdrs} ${srcs} $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:cli_objs> $<TARGET_OBJECTS:simplecpp_objs>)
|
|
|
2825eff |
if (HAVE_RULES)
|
|
|
2825eff |
target_link_libraries(testrunner pcre)
|
|
|
2825eff |
endif()
|
|
|
d836748 |
+ target_link_libraries(testrunner tinyxml2)
|
|
|
d836748 |
|
|
|
d836748 |
add_custom_target(copy_cfg ALL
|
|
|
d836748 |
COMMENT "Copying cfg files")
|