Fix CMake issues
This commit is contained in:
+8
-5
@@ -107,12 +107,13 @@ if(WIN32)
|
|||||||
link_directories(${THIRD_PARTY_DIR}/win32/lib)
|
link_directories(${THIRD_PARTY_DIR}/win32/lib)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# For including pugixml as "pugixml/pugixml.hpp" or gtest as
|
||||||
|
# "gtest/gtest.h".
|
||||||
|
include_directories(${THIRD_PARTY_DIR}/src)
|
||||||
|
|
||||||
# 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(${THIRD_PARTY_DIR}/src/pugixml)
|
add_subdirectory(${THIRD_PARTY_DIR}/src/pugixml)
|
||||||
|
|
||||||
# For including pugixml as "pugixml/pugixml.hpp".
|
|
||||||
include_directories(${THIRD_PARTY_DIR}/src)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(webcc)
|
add_subdirectory(webcc)
|
||||||
@@ -121,10 +122,12 @@ if(WEBCC_ENABLE_EXAMPLES)
|
|||||||
add_subdirectory(example/http_hello_client)
|
add_subdirectory(example/http_hello_client)
|
||||||
add_subdirectory(example/http_hello_async_client)
|
add_subdirectory(example/http_hello_async_client)
|
||||||
|
|
||||||
# REST example needs jsoncpp to parse and create JSON.
|
# For including jsoncpp as "json/json.h".
|
||||||
add_subdirectory(${THIRD_PARTY_DIR}/src/jsoncpp)
|
|
||||||
include_directories(${THIRD_PARTY_DIR}/src/jsoncpp)
|
include_directories(${THIRD_PARTY_DIR}/src/jsoncpp)
|
||||||
|
|
||||||
|
# REST examples need jsoncpp to parse and create JSON.
|
||||||
|
add_subdirectory(${THIRD_PARTY_DIR}/src/jsoncpp)
|
||||||
|
|
||||||
add_subdirectory(example/rest_book_server)
|
add_subdirectory(example/rest_book_server)
|
||||||
add_subdirectory(example/rest_book_client)
|
add_subdirectory(example/rest_book_client)
|
||||||
add_subdirectory(example/rest_book_async_client)
|
add_subdirectory(example/rest_book_async_client)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ set(UT_SRCS
|
|||||||
set(UT_TARGET_NAME webcc_unittest)
|
set(UT_TARGET_NAME webcc_unittest)
|
||||||
|
|
||||||
add_executable(${UT_TARGET_NAME} ${UT_SRCS})
|
add_executable(${UT_TARGET_NAME} ${UT_SRCS})
|
||||||
target_link_libraries(${UT_TARGET_NAME} webcc pugixml gtest ${Boost_LIBRARIES})
|
target_link_libraries(${UT_TARGET_NAME} webcc gtest ${Boost_LIBRARIES})
|
||||||
target_link_libraries(${UT_TARGET_NAME} "${CMAKE_THREAD_LIBS_INIT}")
|
target_link_libraries(${UT_TARGET_NAME} "${CMAKE_THREAD_LIBS_INIT}")
|
||||||
|
|
||||||
add_test(${UT_TARGET_NAME} ${UT_TARGET_NAME})
|
add_test(${UT_TARGET_NAME} ${UT_TARGET_NAME})
|
||||||
|
|||||||
Reference in New Issue
Block a user