Adding new paths for VLD to CMakeFile of HelloWorldTest

The structure of VLD has changed. Now it is needed to give more information.

Change-Id: I84bc5ceab38726c294756d2b5b37230af18761e7

git-svn-id: https://svn.apache.org/repos/asf/etch/trunk@1578896 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/examples/helloworld/cpp/CMakeLists.txt b/examples/helloworld/cpp/CMakeLists.txt
index fa069cf..627a2a8 100644
--- a/examples/helloworld/cpp/CMakeLists.txt
+++ b/examples/helloworld/cpp/CMakeLists.txt
@@ -85,10 +85,13 @@
 ELSEIF(TARGET_OS STREQUAL "Windows")
   target_link_libraries(etch-cpp-helloworld-server etch capu)
   IF (BUILD_CHECK_MEMORY)
+    add_definitions(-DBUILD_CHECK_MEMORY)
+    include_directories (${VLD}/include)
     file (COPY ${VLD}/vld.ini DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE})
-    file (COPY ${VLD}/bin/dbghelp.dll DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE})
-    file (COPY ${VLD}/bin/vld.dll DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE})
-    target_link_libraries (etch-cpp-helloworld-server ${VLD}/lib/vld.lib)
+    file (COPY ${VLD}/bin/Win32/dbghelp.dll DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE})
+	file (COPY ${VLD}/bin/Win32/Microsoft.DTfW.DHL.manifest DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE})
+    file (COPY ${VLD}/bin/Win32/vld_x86.dll DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE})
+    target_link_libraries (etch-cpp-helloworld-server ${VLD}/lib/Win32/vld.lib)
   ENDIF (BUILD_CHECK_MEMORY)
 ELSEIF(TARGET_OS STREQUAL "QNX")
   target_link_libraries (etch-cpp-helloworld-server etch capu c socket)
@@ -123,10 +126,13 @@
 ELSEIF(TARGET_OS STREQUAL "Windows")
   target_link_libraries(etch-cpp-helloworld-client etch capu )
   IF (BUILD_CHECK_MEMORY)
+    add_definitions(-DBUILD_CHECK_MEMORY)
+    include_directories (${VLD}/include)
     file (COPY ${VLD}/vld.ini DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE})
-    file (COPY ${VLD}/bin/dbghelp.dll DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE})
-    file (COPY ${VLD}/bin/vld.dll DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE})
-    target_link_libraries (etch-cpp-helloworld-client ${VLD}/lib/vld.lib)
+    file (COPY ${VLD}/bin/Win32/dbghelp.dll DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE})
+	file (COPY ${VLD}/bin/Win32/Microsoft.DTfW.DHL.manifest DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE})
+    file (COPY ${VLD}/bin/Win32/vld_x86.dll DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE})
+    target_link_libraries (etch-cpp-helloworld-client ${VLD}/lib/Win32/vld.lib)
   ENDIF (BUILD_CHECK_MEMORY)
 ELSEIF(TARGET_OS STREQUAL "QNX")
   target_link_libraries (etch-cpp-helloworld-client etch capu c socket)
diff --git a/examples/helloworld/cpp/src/main/src/MainHelloWorldClient.cpp b/examples/helloworld/cpp/src/main/src/MainHelloWorldClient.cpp
index 4fc1904..442ffd7 100644
--- a/examples/helloworld/cpp/src/main/src/MainHelloWorldClient.cpp
+++ b/examples/helloworld/cpp/src/main/src/MainHelloWorldClient.cpp
@@ -14,6 +14,10 @@
 #include "transport/EtchTransportData.h"
 
 
+#ifdef BUILD_CHECK_MEMORY
+#include "vld.h"
+#endif
+
 using namespace org_apache_etch_examples_helloworld_HelloWorld;
 
 HelloWorldClient* MainHelloWorldClientFactory::newHelloWorldClient(RemoteHelloWorldServer* server)