52e16fb
--- cppcheck-1.70/cli/CMakeLists.txt.stlink	2015-11-13 15:07:57.987502410 +0900
52e16fb
+++ cppcheck-1.70/cli/CMakeLists.txt	2015-11-13 16:13:30.256811541 +0900
52e16fb
@@ -5,7 +5,7 @@
52e16fb
 file(GLOB mainfile "main.cpp")
52e16fb
 list(REMOVE_ITEM srcs ${mainfile})
52e16fb
 
52e16fb
-link_libraries(${PROJECT_NAME} -ltinyxml2)
52e16fb
+link_libraries(-Wl,--whole-archive ${PROJECT_NAME} -Wl,--no-whole-archive -ltinyxml2)
52e16fb
 
52e16fb
 add_library(cli_lib OBJECT ${hdrs} ${srcs})
52e16fb
 
52e16fb
--- cppcheck-1.70/gui/CMakeLists.txt.stlink	2015-11-13 15:07:57.989502413 +0900
52e16fb
+++ cppcheck-1.70/gui/CMakeLists.txt	2015-11-13 16:13:47.930824027 +0900
52e16fb
@@ -21,7 +21,7 @@
52e16fb
     QT4_ADD_RESOURCES(resources "gui.qrc")
52e16fb
     QT4_ADD_TRANSLATION(qms ${tss})
52e16fb
     
52e16fb
-    link_libraries(${PROJECT_NAME} -ltinyxml2 ${QT_LIBRARIES})
52e16fb
+    link_libraries(-Wl,--whole-archive ${PROJECT_NAME} -Wl,--no-whole-archive -ltinyxml2 ${QT_LIBRARIES})
52e16fb
 
52e16fb
     add_executable(cppcheck-gui ${hdrs} ${srcs} ${uis_hdrs} ${resources} ${qms})
52e16fb