Automatically install VLD to example output folder.

This commit is contained in:
Chunting Gu
2018-10-18 11:21:15 +08:00
parent c424e2b690
commit 6a51be172a
12 changed files with 68 additions and 28 deletions
+8
View File
@@ -11,3 +11,11 @@ add_executable(${TARGET_NAME} ${SRCS})
target_link_libraries(${TARGET_NAME} webcc jsoncpp ${Boost_LIBRARIES})
target_link_libraries(${TARGET_NAME} "${CMAKE_THREAD_LIBS_INIT}")
# Install VLD DLLs to build dir so that the example can be launched from
# inside VS.
if(WEBCC_ENABLE_VLD)
install(DIRECTORY ${THIRD_PARTY_DIR}/win32/bin/debug/vld/
CONFIGURATIONS Debug
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/Debug)
endif()
-5
View File
@@ -9,11 +9,6 @@
#include "example/common/book.h"
#include "example/common/book_json.h"
// In order to run with VLD, please copy the following files to the example
// output folder from "third_party\win32\bin":
// - dbghelp.dll
// - Microsoft.DTfW.DHL.manifest
// - vld_x86.dll
#if (defined(WIN32) || defined(_WIN64))
#if defined(_DEBUG) && defined(WEBCC_ENABLE_VLD)
#pragma message ("< include vld.h >")
+8
View File
@@ -13,3 +13,11 @@ add_executable(${TARGET_NAME} ${SRCS})
target_link_libraries(${TARGET_NAME} webcc jsoncpp ${Boost_LIBRARIES})
target_link_libraries(${TARGET_NAME} "${CMAKE_THREAD_LIBS_INIT}")
# Install VLD DLLs to build dir so that the example can be launched from
# inside VS.
if(WEBCC_ENABLE_VLD)
install(DIRECTORY ${THIRD_PARTY_DIR}/win32/bin/debug/vld/
CONFIGURATIONS Debug
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/Debug)
endif()
-5
View File
@@ -5,11 +5,6 @@
#include "example/rest_book_server/services.h"
// In order to run with VLD, please copy the following files to the example
// output folder from "third_party\win32\bin":
// - dbghelp.dll
// - Microsoft.DTfW.DHL.manifest
// - vld_x86.dll
#if (defined(WIN32) || defined(_WIN64))
#if defined(_DEBUG) && defined(WEBCC_ENABLE_VLD)
#pragma message ("< include vld.h >")
+8
View File
@@ -13,3 +13,11 @@ add_executable(${TARGET_NAME} ${SRCS})
target_link_libraries(${TARGET_NAME} webcc pugixml ${Boost_LIBRARIES})
target_link_libraries(${TARGET_NAME} "${CMAKE_THREAD_LIBS_INIT}")
# Install VLD DLLs to build dir so that the example can be launched from
# inside VS.
if(WEBCC_ENABLE_VLD)
install(DIRECTORY ${THIRD_PARTY_DIR}/win32/bin/debug/vld/
CONFIGURATIONS Debug
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/Debug)
endif()
+8
View File
@@ -4,6 +4,14 @@
#include "example/soap_book_client/book_client.h"
#if (defined(WIN32) || defined(_WIN64))
#if defined(_DEBUG) && defined(WEBCC_ENABLE_VLD)
#pragma message ("< include vld.h >")
#include "vld/vld.h"
#pragma comment(lib, "vld")
#endif
#endif
void Help(const char* argv0) {
std::cout << "Usage: " << argv0 << " <host> <port>" << std::endl;
std::cout << " E.g.," << std::endl;
+8
View File
@@ -13,3 +13,11 @@ add_executable(${TARGET_NAME} ${SRCS})
target_link_libraries(${TARGET_NAME} webcc pugixml ${Boost_LIBRARIES})
target_link_libraries(${TARGET_NAME} "${CMAKE_THREAD_LIBS_INIT}")
# Install VLD DLLs to build dir so that the example can be launched from
# inside VS.
if(WEBCC_ENABLE_VLD)
install(DIRECTORY ${THIRD_PARTY_DIR}/win32/bin/debug/vld/
CONFIGURATIONS Debug
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/Debug)
endif()
+8
View File
@@ -5,6 +5,14 @@
#include "example/soap_book_server/book_service.h"
#if (defined(WIN32) || defined(_WIN64))
#if defined(_DEBUG) && defined(WEBCC_ENABLE_VLD)
#pragma message ("< include vld.h >")
#include "vld/vld.h"
#pragma comment(lib, "vld")
#endif
#endif
void Help(const char* argv0) {
std::cout << "Usage: " << argv0 << " <port>" << std::endl;
std::cout << " E.g.," << std::endl;