Automatically install VLD to example output folder.
This commit is contained in:
+20
-18
@@ -124,44 +124,46 @@ endif()
|
|||||||
# For including its own headers as "webcc/http_client.h".
|
# For including its own headers as "webcc/http_client.h".
|
||||||
include_directories(${PROJECT_SOURCE_DIR})
|
include_directories(${PROJECT_SOURCE_DIR})
|
||||||
|
|
||||||
|
set(THIRD_PARTY_DIR ${PROJECT_SOURCE_DIR}/third_party)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
include_directories(${PROJECT_SOURCE_DIR}/third_party/win32/include)
|
include_directories(${THIRD_PARTY_DIR}/win32/include)
|
||||||
link_directories(${PROJECT_SOURCE_DIR}/third_party/win32/lib)
|
link_directories(${THIRD_PARTY_DIR}/win32/lib)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# SOAP support needs pugixml to parse and create XML.
|
# SOAP support needs pugixml to parse and create XML.
|
||||||
if(WEBCC_ENABLE_SOAP)
|
if(WEBCC_ENABLE_SOAP)
|
||||||
add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/src/pugixml)
|
add_subdirectory(${THIRD_PARTY_DIR}/src/pugixml)
|
||||||
|
|
||||||
# For including pugixml as "pugixml/pugixml.hpp".
|
# For including pugixml as "pugixml/pugixml.hpp".
|
||||||
include_directories(${PROJECT_SOURCE_DIR}/third_party/src)
|
include_directories(${THIRD_PARTY_DIR}/src)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(webcc)
|
add_subdirectory(webcc)
|
||||||
|
|
||||||
if(WEBCC_BUILD_EXAMPLE)
|
if(WEBCC_BUILD_EXAMPLE)
|
||||||
add_subdirectory(${PROJECT_SOURCE_DIR}/example/http_hello_client)
|
add_subdirectory(example/http_hello_client)
|
||||||
add_subdirectory(${PROJECT_SOURCE_DIR}/example/http_hello_async_client)
|
add_subdirectory(example/http_hello_async_client)
|
||||||
|
|
||||||
# REST example needs jsoncpp to parse and create JSON.
|
# REST example needs jsoncpp to parse and create JSON.
|
||||||
add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/src/jsoncpp)
|
add_subdirectory(${THIRD_PARTY_DIR}/src/jsoncpp)
|
||||||
include_directories(${PROJECT_SOURCE_DIR}/third_party/src/jsoncpp)
|
include_directories(${THIRD_PARTY_DIR}/src/jsoncpp)
|
||||||
|
|
||||||
add_subdirectory(${PROJECT_SOURCE_DIR}/example/rest_book_server)
|
add_subdirectory(example/rest_book_server)
|
||||||
add_subdirectory(${PROJECT_SOURCE_DIR}/example/rest_book_client)
|
add_subdirectory(example/rest_book_client)
|
||||||
add_subdirectory(${PROJECT_SOURCE_DIR}/example/rest_book_async_client)
|
add_subdirectory(example/rest_book_async_client)
|
||||||
|
|
||||||
if(WEBCC_ENABLE_SOAP)
|
if(WEBCC_ENABLE_SOAP)
|
||||||
add_subdirectory(${PROJECT_SOURCE_DIR}/example/soap_calc_server)
|
add_subdirectory(example/soap_calc_server)
|
||||||
add_subdirectory(${PROJECT_SOURCE_DIR}/example/soap_calc_client)
|
add_subdirectory(example/soap_calc_client)
|
||||||
add_subdirectory(${PROJECT_SOURCE_DIR}/example/soap_calc_client_parasoft)
|
add_subdirectory(example/soap_calc_client_parasoft)
|
||||||
add_subdirectory(${PROJECT_SOURCE_DIR}/example/soap_book_server)
|
add_subdirectory(example/soap_book_server)
|
||||||
add_subdirectory(${PROJECT_SOURCE_DIR}/example/soap_book_client)
|
add_subdirectory(example/soap_book_client)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WEBCC_ENABLE_SSL)
|
if(WEBCC_ENABLE_SSL)
|
||||||
add_subdirectory(${PROJECT_SOURCE_DIR}/example/http_ssl_client)
|
add_subdirectory(example/http_ssl_client)
|
||||||
add_subdirectory(${PROJECT_SOURCE_DIR}/example/rest_github_client)
|
add_subdirectory(example/rest_github_client)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@@ -11,3 +11,11 @@ add_executable(${TARGET_NAME} ${SRCS})
|
|||||||
|
|
||||||
target_link_libraries(${TARGET_NAME} webcc jsoncpp ${Boost_LIBRARIES})
|
target_link_libraries(${TARGET_NAME} webcc jsoncpp ${Boost_LIBRARIES})
|
||||||
target_link_libraries(${TARGET_NAME} "${CMAKE_THREAD_LIBS_INIT}")
|
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()
|
||||||
|
|||||||
@@ -9,11 +9,6 @@
|
|||||||
#include "example/common/book.h"
|
#include "example/common/book.h"
|
||||||
#include "example/common/book_json.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(WIN32) || defined(_WIN64))
|
||||||
#if defined(_DEBUG) && defined(WEBCC_ENABLE_VLD)
|
#if defined(_DEBUG) && defined(WEBCC_ENABLE_VLD)
|
||||||
#pragma message ("< include vld.h >")
|
#pragma message ("< include vld.h >")
|
||||||
|
|||||||
@@ -13,3 +13,11 @@ add_executable(${TARGET_NAME} ${SRCS})
|
|||||||
|
|
||||||
target_link_libraries(${TARGET_NAME} webcc jsoncpp ${Boost_LIBRARIES})
|
target_link_libraries(${TARGET_NAME} webcc jsoncpp ${Boost_LIBRARIES})
|
||||||
target_link_libraries(${TARGET_NAME} "${CMAKE_THREAD_LIBS_INIT}")
|
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,11 +5,6 @@
|
|||||||
|
|
||||||
#include "example/rest_book_server/services.h"
|
#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(WIN32) || defined(_WIN64))
|
||||||
#if defined(_DEBUG) && defined(WEBCC_ENABLE_VLD)
|
#if defined(_DEBUG) && defined(WEBCC_ENABLE_VLD)
|
||||||
#pragma message ("< include vld.h >")
|
#pragma message ("< include vld.h >")
|
||||||
|
|||||||
@@ -13,3 +13,11 @@ add_executable(${TARGET_NAME} ${SRCS})
|
|||||||
|
|
||||||
target_link_libraries(${TARGET_NAME} webcc pugixml ${Boost_LIBRARIES})
|
target_link_libraries(${TARGET_NAME} webcc pugixml ${Boost_LIBRARIES})
|
||||||
target_link_libraries(${TARGET_NAME} "${CMAKE_THREAD_LIBS_INIT}")
|
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()
|
||||||
|
|||||||
@@ -4,6 +4,14 @@
|
|||||||
|
|
||||||
#include "example/soap_book_client/book_client.h"
|
#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) {
|
void Help(const char* argv0) {
|
||||||
std::cout << "Usage: " << argv0 << " <host> <port>" << std::endl;
|
std::cout << "Usage: " << argv0 << " <host> <port>" << std::endl;
|
||||||
std::cout << " E.g.," << std::endl;
|
std::cout << " E.g.," << std::endl;
|
||||||
|
|||||||
@@ -13,3 +13,11 @@ add_executable(${TARGET_NAME} ${SRCS})
|
|||||||
|
|
||||||
target_link_libraries(${TARGET_NAME} webcc pugixml ${Boost_LIBRARIES})
|
target_link_libraries(${TARGET_NAME} webcc pugixml ${Boost_LIBRARIES})
|
||||||
target_link_libraries(${TARGET_NAME} "${CMAKE_THREAD_LIBS_INIT}")
|
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,6 +5,14 @@
|
|||||||
|
|
||||||
#include "example/soap_book_server/book_service.h"
|
#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) {
|
void Help(const char* argv0) {
|
||||||
std::cout << "Usage: " << argv0 << " <port>" << std::endl;
|
std::cout << "Usage: " << argv0 << " <port>" << std::endl;
|
||||||
std::cout << " E.g.," << std::endl;
|
std::cout << " E.g.," << std::endl;
|
||||||
|
|||||||
Reference in New Issue
Block a user