|
|
bd7178b |
diff -urp cppcheck-1.88.orig/cli/CMakeLists.txt cppcheck-1.88/cli/CMakeLists.txt
|
|
|
bd7178b |
--- cppcheck-1.88.orig/cli/CMakeLists.txt 2019-06-29 03:51:25.000000000 -0400
|
|
|
bd7178b |
+++ cppcheck-1.88/cli/CMakeLists.txt 2019-07-01 20:38:10.056775258 -0400
|
|
|
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")
|
|
|
3d97d3e |
@@ -8,7 +7,7 @@ file(GLOB mainfile "main.cpp")
|
|
|
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)
|
|
|
3d97d3e |
find_library(PCRE_LIBRARY pcre)
|
|
|
3d97d3e |
target_link_libraries(cppcheck ${PCRE_LIBRARY})
|
|
|
3d97d3e |
@@ -18,6 +17,7 @@ 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}
|
|
|
bd7178b |
diff -urp cppcheck-1.88.orig/CMakeLists.txt cppcheck-1.88/CMakeLists.txt
|
|
|
bd7178b |
--- cppcheck-1.88.orig/CMakeLists.txt 2019-06-29 03:51:25.000000000 -0400
|
|
|
bd7178b |
+++ cppcheck-1.88/CMakeLists.txt 2019-07-01 20:38:10.078775256 -0400
|
|
|
bd7178b |
@@ -19,7 +19,6 @@ if (BUILD_TESTS)
|
|
|
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
|
|
|
bd7178b |
diff -urp cppcheck-1.88.orig/gui/CMakeLists.txt cppcheck-1.88/gui/CMakeLists.txt
|
|
|
bd7178b |
--- cppcheck-1.88.orig/gui/CMakeLists.txt 2019-06-29 03:51:25.000000000 -0400
|
|
|
bd7178b |
+++ cppcheck-1.88/gui/CMakeLists.txt 2019-07-01 20:41:48.862751778 -0400
|
|
|
3d97d3e |
@@ -10,7 +10,6 @@ if (BUILD_GUI)
|
|
|
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")
|
|
|
3d97d3e |
@@ -20,11 +19,11 @@ if (BUILD_GUI)
|
|
|
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)
|
|
|
bd7178b |
if(WITH_QCHART)
|
|
|
bd7178b |
target_compile_definitions (cppcheck-gui PRIVATE HAVE_QCHART )
|
|
|
bd7178b |
target_link_libraries(cppcheck-gui Qt5::Charts)
|
|
|
bd7178b |
diff -urp cppcheck-1.88.orig/test/CMakeLists.txt cppcheck-1.88/test/CMakeLists.txt
|
|
|
bd7178b |
--- cppcheck-1.88.orig/test/CMakeLists.txt 2019-06-29 03:51:25.000000000 -0400
|
|
|
bd7178b |
+++ cppcheck-1.88/test/CMakeLists.txt 2019-07-01 20:43:12.299742824 -0400
|
|
|
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")
|